Update #7 - FXAA Improvements
aye look at those eagler patch file changes, you can finally see what I actually did
This commit is contained in:
parent
67a922d528
commit
2f42cc9fb6
Binary file not shown.
|
@ -1 +1 @@
|
|||
u6
|
||||
u7
|
|
@ -147,17 +147,19 @@
|
|||
|
||||
~ EaglercraftGPU.glLineWidth(1.0F);
|
||||
|
||||
> INSERT 26 : 31 @ 26
|
||||
> INSERT 26 : 33 @ 26
|
||||
|
||||
+
|
||||
+ if (this.mc.gameSettings.fxaa) {
|
||||
+ boolean fxaa = (this.mc.gameSettings.fxaa == 0 && this.mc.gameSettings.fancyGraphics)
|
||||
+ || this.mc.gameSettings.fxaa == 1;
|
||||
+ if (fxaa) {
|
||||
+ EffectPipelineFXAA.begin(this.mc.displayWidth, this.mc.displayHeight);
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 21 : 25 @ 16
|
||||
> INSERT 23 : 27 @ 16
|
||||
|
||||
+ if (this.mc.gameSettings.fxaa) {
|
||||
+ if (fxaa) {
|
||||
+ EffectPipelineFXAA.end();
|
||||
+ }
|
||||
+
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
+ public boolean hud24h = false;
|
||||
+ public boolean chunkFix = true;
|
||||
+ public boolean fog = true;
|
||||
+ public boolean fxaa = true;
|
||||
+ public int fxaa = 0;
|
||||
|
||||
> CHANGE 10 : 11 @ 1 : 2
|
||||
|
||||
|
@ -159,13 +159,13 @@
|
|||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.FXAA) {
|
||||
+ this.fxaa = !this.fxaa;
|
||||
+ this.fxaa = (this.fxaa + parInt1) % 3;
|
||||
+ }
|
||||
+
|
||||
|
||||
> DELETE 90 @ 54 : 60
|
||||
|
||||
> INSERT 12 : 30 @ 18
|
||||
> INSERT 12 : 28 @ 18
|
||||
|
||||
+ case HUD_COORDS:
|
||||
+ return this.hudCoords;
|
||||
|
@ -183,10 +183,8 @@
|
|||
+ return this.chunkFix;
|
||||
+ case FOG:
|
||||
+ return this.fog;
|
||||
+ case FXAA:
|
||||
+ return this.fxaa;
|
||||
|
||||
> CHANGE 61 : 64 @ 43 : 47
|
||||
> CHANGE 59 : 62 @ 43 : 47
|
||||
|
||||
~ : (parOptions == GameSettings.Options.CHAT_SCALE
|
||||
~ ? s + (int) (f * 90.0F + 10.0F) + "%"
|
||||
|
@ -222,7 +220,18 @@
|
|||
~ + "%")
|
||||
~ : "yee"))))))))))));
|
||||
|
||||
> CHANGE 54 : 56 @ 69 : 70
|
||||
> INSERT 47 : 55 @ 62
|
||||
|
||||
+ } else if (parOptions == GameSettings.Options.FXAA) {
|
||||
+ if (this.fxaa == 0) {
|
||||
+ return s + I18n.format("options.fxaa.auto");
|
||||
+ } else if (this.fxaa == 1) {
|
||||
+ return s + I18n.format("options.on");
|
||||
+ } else {
|
||||
+ return s + I18n.format("options.off");
|
||||
+ }
|
||||
|
||||
> CHANGE 15 : 17 @ 7 : 8
|
||||
|
||||
~ byte[] options = EagRuntime.getStorage("g");
|
||||
~ if (options == null) {
|
||||
|
@ -254,7 +263,7 @@
|
|||
|
||||
> DELETE 4 @ 8 : 12
|
||||
|
||||
> INSERT 116 : 152 @ 120
|
||||
> INSERT 116 : 153 @ 120
|
||||
|
||||
+ if (astring[0].equals("hudFps")) {
|
||||
+ this.hudFps = astring[1].equals("true");
|
||||
|
@ -289,11 +298,12 @@
|
|||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("fxaa")) {
|
||||
+ this.fxaa = astring[1].equals("true");
|
||||
+ this.fxaa = (astring[1].equals("true") || astring[1].equals("false")) ? 0
|
||||
+ : Integer.parseInt(astring[1]);
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 42 : 44 @ 6
|
||||
> INSERT 43 : 45 @ 6
|
||||
|
||||
+ Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
||||
+
|
||||
|
@ -366,6 +376,6 @@
|
|||
~ HUD_COORDS("options.hud.coords", false, true), HUD_STATS("options.hud.stats", false, true),
|
||||
~ HUD_WORLD("options.hud.world", false, true), HUD_PLAYER("options.hud.player", false, true),
|
||||
~ HUD_24H("options.hud.24h", false, true), CHUNK_FIX("options.chunkFix", false, true),
|
||||
~ FOG("options.fog", false, true), FXAA("options.fxaa", false, true);
|
||||
~ FOG("options.fog", false, true), FXAA("options.fxaa", false, false);
|
||||
|
||||
> EOF
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
~ eaglercraft.recording.start=Record Screen...
|
||||
~ eaglercraft.soundCategory.voice=Voice
|
||||
|
||||
> INSERT 5 : 71 @ 8
|
||||
> INSERT 5 : 72 @ 8
|
||||
|
||||
+ eaglercraft.resourcePack.prompt.title=What do you want to do with '%s'?
|
||||
+ eaglercraft.resourcePack.prompt.text=Tip: Hold Shift to skip this screen when selecting a resource pack!
|
||||
|
@ -70,6 +70,7 @@
|
|||
+ eaglercraft.options.chunkFix=Chunk Lag Fix
|
||||
+ eaglercraft.options.fog=Fog
|
||||
+ eaglercraft.options.fxaa=FXAA Antialiasing
|
||||
+ eaglercraft.options.fxaa.auto=Auto
|
||||
+
|
||||
+ eaglercraft.key.function=Function
|
||||
+ eaglercraft.key.zoomCamera=Zoom Camera
|
||||
|
@ -81,7 +82,7 @@
|
|||
+ eaglercraft.auth.continue=Join Server
|
||||
+
|
||||
|
||||
> CHANGE 534 : 535 @ 468 : 469
|
||||
> CHANGE 535 : 536 @ 468 : 469
|
||||
|
||||
~ resourcePack.openFolder=Open resource pack
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ public class EaglercraftVersion {
|
|||
/// Customize these to fit your fork:
|
||||
|
||||
public static final String projectForkName = "EaglercraftX";
|
||||
public static final String projectForkVersion = "u6";
|
||||
public static final String projectForkVersion = "u7";
|
||||
public static final String projectForkVendor = "lax1dude";
|
||||
|
||||
public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
||||
|
@ -23,7 +23,7 @@ public class EaglercraftVersion {
|
|||
public static final String projectOriginName = "EaglercraftX";
|
||||
public static final String projectOriginAuthor = "lax1dude";
|
||||
public static final String projectOriginRevision = "1.8";
|
||||
public static final String projectOriginVersion = "u6";
|
||||
public static final String projectOriginVersion = "u7";
|
||||
|
||||
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ uniform vec2 u_screenSize2f;
|
|||
GREEN AS LUMA OPTION SUPPORT FUNCTION
|
||||
============================================================================*/
|
||||
#if (FXAA_GREEN_AS_LUMA == 0)
|
||||
FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return dot(rgba.xyz, vec3(0.299, 0.587, 0.114)); }
|
||||
FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return dot(rgba.xyz * rgba.xyz, vec3(0.299, 0.587, 0.114)); }
|
||||
#else
|
||||
FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }
|
||||
#endif
|
||||
|
@ -277,22 +277,24 @@ FxaaFloat4 FxaaPixelShader(
|
|||
}
|
||||
/*==========================================================================*/
|
||||
|
||||
#define edgeSharpness 4.0
|
||||
#define edgeThreshold 0.125
|
||||
#define edgeSharpness 3.0
|
||||
#define edgeThreshold 0.15
|
||||
#define edgeThresholdMin 0.05
|
||||
|
||||
void main(){
|
||||
vec2 screenSize05 = 0.5 * u_screenSize2f;
|
||||
|
||||
vec4 posPos;
|
||||
posPos.xy = v_position2f - (0.5 * u_screenSize2f);
|
||||
posPos.zw = v_position2f + (0.5 * u_screenSize2f);
|
||||
posPos.xy = v_position2f - screenSize05;
|
||||
posPos.zw = v_position2f + screenSize05;
|
||||
|
||||
vec4 rcpFrameOpt;
|
||||
rcpFrameOpt.xy = vec2(-0.50, -0.50) * u_screenSize2f;
|
||||
rcpFrameOpt.zw = vec2( 0.50, 0.50) * u_screenSize2f;
|
||||
rcpFrameOpt.xy = -screenSize05;
|
||||
rcpFrameOpt.zw = screenSize05;
|
||||
|
||||
vec4 rcpFrameOpt2;
|
||||
rcpFrameOpt2.xy = vec2(-2.0, -2.0) * u_screenSize2f;
|
||||
rcpFrameOpt2.zw = vec2( 2.0, 2.0) * u_screenSize2f;
|
||||
rcpFrameOpt2.zw = -rcpFrameOpt2.xy;
|
||||
|
||||
output4f = vec4(FxaaPixelShader(v_position2f, posPos, u_screenTexture, rcpFrameOpt, rcpFrameOpt2, edgeSharpness, edgeThreshold, edgeThresholdMin).rgb, 1.0);
|
||||
output4f = vec4(FxaaPixelShader(v_position2f + screenSize05, posPos, u_screenTexture, rcpFrameOpt, rcpFrameOpt2, edgeSharpness, edgeThreshold, edgeThresholdMin).rgb, 1.0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user