aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-04 19:51:20 +0200
committermakamys <makamys@outlook.com>2022-06-04 19:51:47 +0200
commit3409494a1cde6eb14acada901a337d7608b55c64 (patch)
tree62d18a0ce583d23af9c19b9096c1603a2e02dae6 /src
parent7709c47bc1e2e147aad018cab4f51f23825ed851 (diff)
downloadNeodymium-3409494a1cde6eb14acada901a337d7608b55c64.tar.gz
Neodymium-3409494a1cde6eb14acada901a337d7608b55c64.tar.bz2
Neodymium-3409494a1cde6eb14acada901a337d7608b55c64.zip
Remove the hecking fog
It was the cause of the poor performance. Now the mod consistently gives a substantial FPS boost compared to OptiFine alone.
Diffstat (limited to 'src')
-rw-r--r--src/main/resources/shaders/chunk.frag34
1 files changed, 8 insertions, 26 deletions
diff --git a/src/main/resources/shaders/chunk.frag b/src/main/resources/shaders/chunk.frag
index ae187cb..0f23b5f 100644
--- a/src/main/resources/shaders/chunk.frag
+++ b/src/main/resources/shaders/chunk.frag
@@ -13,31 +13,16 @@ uniform sampler2D atlas;
uniform sampler2D lightTex;
void main()
-{
- //FragColor = texture(lightTex, TexCoord);
- //FragColor = texture(lightTex, vec2(8.0/256.0,8.0/256.0));
- //FragColor = texture(lightTex, vec2(0, 0));
- //FragColor = vec4(texture(lightTex, vec2(0, 0)).xyz,1);
- //FragColor = vec4(BTexCoord.xy / 256, 0, 1);
- //FragColor = texture(lightTex, (BTexCoord + 8.0) / 256.0);
- //FragColor = texture(light, vec2(16,16));
- //FragColor = vec4(1,0,0,1);
- //FragColor = DaColor/256.0;
-
+{
vec4 texColor = texture(atlas, TexCoord);
vec4 colorMult = DaColor/256.0;
vec4 lightyColor = texture(lightTex, (BTexCoord + 8.0) / 256.0);
- //vec4 lightyMultColor = vec4(lightyColor.x * colorMult.x, lightyColor.y * colorMult.y, lightyColor.z * colorMult.z, lightyColor.w * colorMult.w);
-
- //FragColor = vec4(texColor.x * colorMult.x, texColor.y * colorMult.y, texColor.z * colorMult.z, texColor.w * colorMult.w);
- //vec4 texMultColor = texColor * colorMult;
- //FragColor = texMultColor;// + (lightyColor - vec4(0.5,0.5,0.5,0.0));
- //FragColor = vec4(lightyColor.xyz, 1);
- //FragColor = ((texColor * colorMult) * lightyColor);
vec4 rasterColor = ((texColor * colorMult) * lightyColor);
- float s = FogStartEnd.x;
+
+ // TODO reimplement fog in a way that's not a performance hog
+ /*float s = FogStartEnd.x;
float e = FogStartEnd.y;
vec4 ndcPos;
@@ -50,12 +35,9 @@ void main()
vec4 eyePos = ProjInv * clipPos;
float z = length(eyePos);
- /*
- if(z < 200){
- discard;
- }
- */
float f = (e - z) / (e - s);
f = clamp(f, 0, 1);
- FragColor = mix(FogColor, rasterColor, f);
-} \ No newline at end of file
+ FragColor = mix(FogColor, rasterColor, f);*/
+
+ FragColor = rasterColor;
+}