aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/shaders
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-23 09:16:11 +0200
committermakamys <makamys@outlook.com>2022-06-23 10:02:16 +0200
commit466e033c5c2941f8ef71a36cd86ae8d3a77a1d00 (patch)
tree38b87261bcb56b549db1e0ee4d6c577eec38ea55 /src/main/resources/shaders
parentde1886f77b8eba34a3f3c00cf42169ab468030e9 (diff)
downloadNeodymium-466e033c5c2941f8ef71a36cd86ae8d3a77a1d00.tar.gz
Neodymium-466e033c5c2941f8ef71a36cd86ae8d3a77a1d00.tar.bz2
Neodymium-466e033c5c2941f8ef71a36cd86ae8d3a77a1d00.zip
Don't store megaquad info if chunk simplification is disabled
Reduces memory usage by a bit. Doesn't seem to affect FPS.
Diffstat (limited to 'src/main/resources/shaders')
-rw-r--r--src/main/resources/shaders/chunk.vert7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/resources/shaders/chunk.vert b/src/main/resources/shaders/chunk.vert
index eb43942..b0d9177 100644
--- a/src/main/resources/shaders/chunk.vert
+++ b/src/main/resources/shaders/chunk.vert
@@ -3,7 +3,10 @@ layout (location = 0) in vec3 aPos;
layout (location = 1) in vec2 aTexCoord;
layout (location = 2) in vec2 aBTexCoord;
layout (location = 3) in vec4 aColor;
+
+#ifdef SIMPLIFY_MESHES
layout (location = 4) in vec4 aMQPos; // if the first coordinate is 255, it means: disable megaquad processing for this quad
+#endif
uniform mat4 modelView;
uniform mat4 proj;
@@ -31,7 +34,11 @@ void main()
TexCoord = aTexCoord;
BTexCoord = aBTexCoord;
Color = aColor;
+
+#ifdef SIMPLIFY_MESHES
MQPos = aMQPos;
+#endif
+
Viewport = viewport;
ProjInv = projInv;
FogColor = fogColor;