projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stuff
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
water.vs
diff --git
a/shaders/water.vs
b/shaders/water.vs
index 3d6372c57f76f4000bf8fc8811e68160f06d71a4..c8ac51bcefa266db568a8c12b23ad7895c2bdf1a 100644
(file)
--- a/
shaders/water.vs
+++ b/
shaders/water.vs
@@
-6,6
+6,7
@@
uniform vec4 uDepthBounds;
out vec4 aUv;
out vec3 aCo;
out vec4 aUv;
out vec3 aCo;
+out float aDepth;
void main()
{
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;
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.
0
1,depth_coords);
aCo = world_pos;
aCo = world_pos;
+
+ aDepth = gl_Position.z;
}
}