Shaders: Complete 478e753. OpenGL 4.3 compatiblity
authorSmallJoker <mk939@ymail.com>
Sat, 18 Apr 2020 16:36:47 +0000 (18:36 +0200)
committerSmallJoker <mk939@ymail.com>
Sat, 18 Apr 2020 16:36:47 +0000 (18:36 +0200)
client/shaders/nodes_shader/opengl_vertex.glsl

index ccff1260d1e1d64297dd344f8986cf5cc403ebdb..0d8d0a2a5123fe39e12d70d535bb6e7649b04bfc 100644 (file)
@@ -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) +