aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/shaders/chunk.frag
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-24 01:51:46 +0200
committermakamys <makamys@outlook.com>2022-06-24 01:58:22 +0200
commit00753d2ed1174ffee13f25e548cd4b70536017f4 (patch)
treeb9b45a9bb5b609ea277317060d08c32bf1467073 /src/main/resources/shaders/chunk.frag
parentec2dc176e92ab095237cc45ee365edab7ae030eb (diff)
downloadNeodymium-00753d2ed1174ffee13f25e548cd4b70536017f4.tar.gz
Neodymium-00753d2ed1174ffee13f25e548cd4b70536017f4.tar.bz2
Neodymium-00753d2ed1174ffee13f25e548cd4b70536017f4.zip
Leave alpha out of the fragment shader calculations in pass 1
Improves FPS from 400 to 420 in savanna
Diffstat (limited to 'src/main/resources/shaders/chunk.frag')
-rw-r--r--src/main/resources/shaders/chunk.frag9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/resources/shaders/chunk.frag b/src/main/resources/shaders/chunk.frag
index d8ffdcf..1066dc5 100644
--- a/src/main/resources/shaders/chunk.frag
+++ b/src/main/resources/shaders/chunk.frag
@@ -37,8 +37,13 @@ void main()
vec4 colorMult = Color/256.0;
vec4 lightyColor = texture(lightTex, (BTexCoord + 8.0) / 256.0);
-
- vec4 rasterColor = ((texColor * colorMult) * lightyColor);
+
+ vec4 rasterColor =
+#ifdef PASS_0
+ vec4((texColor.xyz * colorMult.xyz) * lightyColor.xyz, texColor.w);
+#else
+ (texColor * colorMult) * lightyColor;
+#endif
#ifdef RENDER_FOG
FragColor = vec4(mix(FogColor.xyz, rasterColor.xyz, FogFactor), rasterColor.w);