aboutsummaryrefslogtreecommitdiff
path: root/client/shaders/nodes_shader
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2020-04-18 18:36:47 +0200
committerSmallJoker <mk939@ymail.com>2020-04-18 18:36:47 +0200
commitc87d52a5fa21f31c2d68795822b48c8bf993ca6b (patch)
tree0082382ae93a44dfc2a544e97e6084adddf34ca0 /client/shaders/nodes_shader
parent87829cd7446dd13d1dfd27d96e0b4aeb2f234e33 (diff)
downloadminetest-c87d52a5fa21f31c2d68795822b48c8bf993ca6b.tar.gz
minetest-c87d52a5fa21f31c2d68795822b48c8bf993ca6b.tar.bz2
minetest-c87d52a5fa21f31c2d68795822b48c8bf993ca6b.zip
Shaders: Complete 478e753. OpenGL 4.3 compatiblity
Diffstat (limited to 'client/shaders/nodes_shader')
-rw-r--r--client/shaders/nodes_shader/opengl_vertex.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/shaders/nodes_shader/opengl_vertex.glsl b/client/shaders/nodes_shader/opengl_vertex.glsl
index ccff1260d..0d8d0a2a5 100644
--- a/client/shaders/nodes_shader/opengl_vertex.glsl
+++ b/client/shaders/nodes_shader/opengl_vertex.glsl
@@ -101,8 +101,8 @@ void main(void)
float disp_x;
float disp_z;
-#if (MATERIAL_TYPE == TILE_MATERIAL_WAVING_LEAVES && ENABLE_WAVING_LEAVES) || \
- (MATERIAL_TYPE == TILE_MATERIAL_WAVING_PLANTS && ENABLE_WAVING_PLANTS)
+// OpenGL < 4.3 does not support continued preprocessor lines
+#if (MATERIAL_TYPE == TILE_MATERIAL_WAVING_LEAVES && ENABLE_WAVING_LEAVES) || (MATERIAL_TYPE == TILE_MATERIAL_WAVING_PLANTS && ENABLE_WAVING_PLANTS)
vec4 pos2 = mWorld * gl_Vertex;
float tOffset = (pos2.x + pos2.y) * 0.001 + pos2.z * 0.002;
disp_x = (smoothTriangleWave(animationTimer * 23.0 + tOffset) +