Shaders: Complete 478e753
. OpenGL 4.3 compatiblity
parent
87829cd744
commit
c87d52a5fa
|
@ -101,8 +101,8 @@ void main(void)
|
||||||
|
|
||||||
float disp_x;
|
float disp_x;
|
||||||
float disp_z;
|
float disp_z;
|
||||||
#if (MATERIAL_TYPE == TILE_MATERIAL_WAVING_LEAVES && ENABLE_WAVING_LEAVES) || \
|
// OpenGL < 4.3 does not support continued preprocessor lines
|
||||||
(MATERIAL_TYPE == TILE_MATERIAL_WAVING_PLANTS && ENABLE_WAVING_PLANTS)
|
#if (MATERIAL_TYPE == TILE_MATERIAL_WAVING_LEAVES && ENABLE_WAVING_LEAVES) || (MATERIAL_TYPE == TILE_MATERIAL_WAVING_PLANTS && ENABLE_WAVING_PLANTS)
|
||||||
vec4 pos2 = mWorld * gl_Vertex;
|
vec4 pos2 = mWorld * gl_Vertex;
|
||||||
float tOffset = (pos2.x + pos2.y) * 0.001 + pos2.z * 0.002;
|
float tOffset = (pos2.x + pos2.y) * 0.001 + pos2.z * 0.002;
|
||||||
disp_x = (smoothTriangleWave(animationTimer * 23.0 + tOffset) +
|
disp_x = (smoothTriangleWave(animationTimer * 23.0 + tOffset) +
|
||||||
|
|
Loading…
Reference in New Issue