From 466e033c5c2941f8ef71a36cd86ae8d3a77a1d00 Mon Sep 17 00:00:00 2001 From: makamys Date: Thu, 23 Jun 2022 09:16:11 +0200 Subject: Don't store megaquad info if chunk simplification is disabled Reduces memory usage by a bit. Doesn't seem to affect FPS. --- src/main/resources/shaders/chunk.vert | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/resources') 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; -- cgit