stuff
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / water.vs
index 3d6372c57f76f4000bf8fc8811e68160f06d71a4..c8ac51bcefa266db568a8c12b23ad7895c2bdf1a 100644 (file)
@@ -6,6 +6,7 @@ uniform vec4 uDepthBounds;
 
 out vec4 aUv;
 out vec3 aCo;
+out float aDepth;
 
 void main()
 {
@@ -13,6 +14,8 @@ void main()
    gl_Position = uPv * vec4(world_pos,1.0);
 
    vec2 depth_coords = (world_pos.xz-uDepthBounds.xy)*uDepthBounds.zw;
-   aUv = vec4(world_pos.xz*0.1,depth_coords);
+   aUv = vec4(world_pos.xz*0.01,depth_coords);
    aCo = world_pos;
+
+   aDepth = gl_Position.z;
 }