3d6372c57f76f4000bf8fc8811e68160f06d71a4
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / water.vs
1 #include "vertex_standard.glsl"
2
3 uniform mat4 uPv;
4 uniform mat4x3 uMdl;
5 uniform vec4 uDepthBounds;
6
7 out vec4 aUv;
8 out vec3 aCo;
9
10 void main()
11 {
12 vec3 world_pos = uMdl * vec4( a_co, 1.0 );
13 gl_Position = uPv * vec4(world_pos,1.0);
14
15 vec2 depth_coords = (world_pos.xz-uDepthBounds.xy)*uDepthBounds.zw;
16 aUv = vec4(world_pos.xz*0.1,depth_coords);
17 aCo = world_pos;
18 }