Update #19 - Removed fast math, fixed water shader

This commit is contained in:
LAX1DUDE 2023-06-14 19:59:38 -07:00
parent b2274a25b0
commit ed95ff8bf7
7 changed files with 17 additions and 75 deletions

View File

@ -1 +1 @@
u18 u19

View File

@ -15,7 +15,7 @@
~ GameSettings.Options.BLOCK_ALTERNATIVES, GameSettings.Options.ENTITY_SHADOWS, GameSettings.Options.FOG, ~ GameSettings.Options.BLOCK_ALTERNATIVES, GameSettings.Options.ENTITY_SHADOWS, GameSettings.Options.FOG,
~ GameSettings.Options.FULLSCREEN, GameSettings.Options.HUD_FPS, GameSettings.Options.HUD_COORDS, ~ GameSettings.Options.FULLSCREEN, GameSettings.Options.HUD_FPS, GameSettings.Options.HUD_COORDS,
~ GameSettings.Options.HUD_PLAYER, GameSettings.Options.HUD_STATS, GameSettings.Options.HUD_WORLD, ~ GameSettings.Options.HUD_PLAYER, GameSettings.Options.HUD_STATS, GameSettings.Options.HUD_WORLD,
~ GameSettings.Options.HUD_24H, GameSettings.Options.CHUNK_FIX, GameSettings.Options.FAST_MATH }; ~ GameSettings.Options.HUD_24H, GameSettings.Options.CHUNK_FIX };
> CHANGE 11 : 13 @ 11 : 14 > CHANGE 11 : 13 @ 11 : 14

View File

@ -77,7 +77,7 @@
~ public int guiScale = 3; ~ public int guiScale = 3;
> INSERT 3 : 16 @ 3 > INSERT 3 : 15 @ 3
+ public boolean hudFps = true; + public boolean hudFps = true;
+ public boolean hudCoords = true; + public boolean hudCoords = true;
@ -91,7 +91,6 @@
+ public boolean shaders = false; + public boolean shaders = false;
+ public boolean shadersAODisable = false; + public boolean shadersAODisable = false;
+ public EaglerDeferredConfig deferredShaderConf = new EaglerDeferredConfig(); + public EaglerDeferredConfig deferredShaderConf = new EaglerDeferredConfig();
+ public int fastMath = 1;
> CHANGE 1 : 2 @ 1 : 2 > CHANGE 1 : 2 @ 1 : 2
@ -132,7 +131,7 @@
> DELETE 20 @ 20 : 37 > DELETE 20 @ 20 : 37
> INSERT 13 : 57 @ 13 > INSERT 13 : 53 @ 13
+ if (parOptions == GameSettings.Options.HUD_FPS) { + if (parOptions == GameSettings.Options.HUD_FPS) {
+ this.hudFps = !this.hudFps; + this.hudFps = !this.hudFps;
@ -174,10 +173,6 @@
+ this.mc.toggleFullscreen(); + this.mc.toggleFullscreen();
+ } + }
+ +
+ if (parOptions == GameSettings.Options.FAST_MATH) {
+ this.fastMath = (this.fastMath + parInt1) % 3;
+ }
+
> CHANGE 23 : 24 @ 23 : 34 > CHANGE 23 : 24 @ 23 : 34
@ -246,7 +241,7 @@
> DELETE 11 @ 11 : 19 > DELETE 11 @ 11 : 19
> INSERT 9 : 19 @ 9 > INSERT 9 : 17 @ 9
+ } else if (parOptions == GameSettings.Options.FXAA) { + } else if (parOptions == GameSettings.Options.FXAA) {
+ if (this.fxaa == 0) { + if (this.fxaa == 0) {
@ -256,8 +251,6 @@
+ } else { + } else {
+ return s + I18n.format("options.off"); + return s + I18n.format("options.off");
+ } + }
+ } else if (parOptions == GameSettings.Options.FAST_MATH) {
+ return s + I18n.format("options.fastMath." + this.fastMath);
> CHANGE 7 : 9 @ 7 : 8 > CHANGE 7 : 9 @ 7 : 8
@ -362,12 +355,7 @@
~ this.fxaa = (astring[1].equals("true") || astring[1].equals("false")) ? 0 ~ this.fxaa = (astring[1].equals("true") || astring[1].equals("false")) ? 0
~ : Integer.parseInt(astring[1]); ~ : Integer.parseInt(astring[1]);
> CHANGE 2 : 4 @ 2 : 4 > DELETE 2 @ 2 : 10
~ if (astring[0].equals("fastMath")) {
~ this.fastMath = Integer.parseInt(astring[1]);
> DELETE 2 @ 2 : 6
> INSERT 6 : 12 @ 6 > INSERT 6 : 12 @ 6
@ -401,7 +389,7 @@
> DELETE 13 @ 13 : 24 > DELETE 13 @ 13 : 24
> INSERT 5 : 16 @ 5 > INSERT 5 : 15 @ 5
+ printwriter.println("hudFps:" + this.hudFps); + printwriter.println("hudFps:" + this.hudFps);
+ printwriter.println("hudWorld:" + this.hudWorld); + printwriter.println("hudWorld:" + this.hudWorld);
@ -412,7 +400,6 @@
+ printwriter.println("chunkFix:" + this.chunkFix); + printwriter.println("chunkFix:" + this.chunkFix);
+ printwriter.println("fog:" + this.fog); + printwriter.println("fog:" + this.fog);
+ printwriter.println("fxaa:" + this.fxaa); + printwriter.println("fxaa:" + this.fxaa);
+ printwriter.println("fastMath:" + this.fastMath);
+ printwriter.println("shaders:" + this.shaders); + printwriter.println("shaders:" + this.shaders);
> INSERT 5 : 7 @ 5 > INSERT 5 : 7 @ 5

View File

@ -7,14 +7,6 @@
> DELETE 3 @ 3 : 4 > DELETE 3 @ 3 : 4
> CHANGE 53 : 60 @ 53 : 54 > DELETE 52 @ 52 : 53
~ int fastMathSetting = Minecraft.getMinecraft().gameSettings.fastMath;
~ if (fastMathSetting > 0) {
~ float f = fastMathSetting == 2 ? 16.0f : 64.0f;
~ this.renderPartialTicks = ((int) (this.elapsedPartialTicks * f) / f);
~ } else {
~ this.renderPartialTicks = this.elapsedPartialTicks;
~ }
> EOF > EOF

View File

@ -23,15 +23,7 @@
+ import com.google.common.collect.Sets; + import com.google.common.collect.Sets;
+ +
> INSERT 8 : 9 @ 8 > DELETE 18 @ 18 : 19
+ import net.minecraft.client.Minecraft;
> INSERT 4 : 5 @ 4
+ import net.minecraft.entity.EntityLivingBase;
> DELETE 6 @ 6 : 7
> DELETE 12 @ 12 : 27 > DELETE 12 @ 12 : 27
@ -91,41 +83,7 @@
~ return Chunk.getNoSkyLightValue(); ~ return Chunk.getNoSkyLightValue();
> INSERT 896 : 927 @ 896 > DELETE 1286 @ 1286 : 1344
+ int fastMathSetting = Minecraft.getMinecraft().gameSettings.fastMath;
+ if (fastMathSetting > 0) {
+ double posPrec = fastMathSetting == 2 ? 256.0 : 1024.0;
+ float rotPrec = fastMathSetting == 2 ? 64.0f : 128.0f;
+ double velPrec = fastMathSetting == 2 ? 2048.0 : 4096.0;
+ entityIn.lastTickPosX = (long) (entityIn.lastTickPosX * posPrec) / posPrec;
+ entityIn.lastTickPosY = (long) (entityIn.lastTickPosY * posPrec) / posPrec;
+ entityIn.lastTickPosZ = (long) (entityIn.lastTickPosZ * posPrec) / posPrec;
+ entityIn.prevPosX = (int) (entityIn.prevPosX * posPrec) / posPrec;
+ entityIn.prevPosY = (int) (entityIn.prevPosY * posPrec) / posPrec;
+ entityIn.prevPosZ = (int) (entityIn.prevPosZ * posPrec) / posPrec;
+ entityIn.posX = (int) (entityIn.posX * posPrec) / posPrec;
+ entityIn.posY = (int) (entityIn.posY * posPrec) / posPrec;
+ entityIn.posZ = (int) (entityIn.posZ * posPrec) / posPrec;
+ entityIn.prevRotationPitch = (int) (entityIn.prevRotationPitch * rotPrec) / rotPrec;
+ entityIn.prevRotationYaw = (int) (entityIn.prevRotationYaw * rotPrec) / rotPrec;
+ entityIn.rotationPitch = (int) (entityIn.rotationPitch * rotPrec) / rotPrec;
+ entityIn.rotationYaw = (int) (entityIn.rotationYaw * rotPrec) / rotPrec;
+ if (entityIn instanceof EntityLivingBase) {
+ EntityLivingBase l = (EntityLivingBase) entityIn;
+ l.prevRotationYawHead = (int) (l.prevRotationYawHead * rotPrec) / rotPrec;
+ l.rotationYawHead = (int) (l.rotationYawHead * rotPrec) / rotPrec;
+ l.prevRenderYawOffset = (int) (l.prevRenderYawOffset * rotPrec) / rotPrec;
+ l.renderYawOffset = (int) (l.renderYawOffset * rotPrec) / rotPrec;
+ l.prevRotationPitch = (int) (l.prevRotationPitch * rotPrec) / rotPrec;
+ l.rotationPitch = (int) (l.rotationPitch * rotPrec) / rotPrec;
+ }
+ entityIn.motionX = (int) (entityIn.motionX * velPrec) / velPrec;
+ entityIn.motionY = (int) (entityIn.motionY * velPrec) / velPrec;
+ entityIn.motionZ = (int) (entityIn.motionZ * velPrec) / velPrec;
+ }
> DELETE 390 @ 390 : 448
> DELETE 40 @ 40 : 64 > DELETE 40 @ 40 : 64

View File

@ -8,7 +8,7 @@ public class EaglercraftVersion {
/// Customize these to fit your fork: /// Customize these to fit your fork:
public static final String projectForkName = "EaglercraftX"; public static final String projectForkName = "EaglercraftX";
public static final String projectForkVersion = "u18"; public static final String projectForkVersion = "u19";
public static final String projectForkVendor = "lax1dude"; public static final String projectForkVendor = "lax1dude";
public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; 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 projectOriginName = "EaglercraftX";
public static final String projectOriginAuthor = "lax1dude"; public static final String projectOriginAuthor = "lax1dude";
public static final String projectOriginRevision = "1.8"; public static final String projectOriginRevision = "1.8";
public static final String projectOriginVersion = "u18"; public static final String projectOriginVersion = "u19";
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";

View File

@ -69,6 +69,11 @@ void main() {
} }
float gbufferDepth = textureLod(u_gbufferDepthTexture, v_position2f2, 0.0).r; float gbufferDepth = textureLod(u_gbufferDepthTexture, v_position2f2, 0.0).r;
if(gbufferDepth < 0.000001) {
return;
}
vec4 gbufferDepthClipSpace4f = vec4(v_position2f2, gbufferDepth, 1.0); vec4 gbufferDepthClipSpace4f = vec4(v_position2f2, gbufferDepth, 1.0);
gbufferDepthClipSpace4f.xyz *= 2.0; gbufferDepthClipSpace4f.xyz *= 2.0;
gbufferDepthClipSpace4f.xyz -= 1.0; gbufferDepthClipSpace4f.xyz -= 1.0;