projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improved build
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
water.vs
diff --git
a/shaders/water.vs
b/shaders/water.vs
index a78bf308c9656c2974f72f9f936d1667f3b4752b..6fbee776615a0dae1f21d03f355d4ca4bba80bcd 100644
(file)
--- a/
shaders/water.vs
+++ b/
shaders/water.vs
@@
-2,20
+2,15
@@
uniform mat4 uPv;
uniform mat4x3 uMdl;
uniform mat4 uPv;
uniform mat4x3 uMdl;
-uniform vec4 uDepthBounds;
out vec4 aUv;
out vec3 aCo;
out vec4 aUv;
out vec3 aCo;
-out float aDepth;
void main()
{
vec3 world_pos = uMdl * vec4( a_co, 1.0 );
gl_Position = uPv * vec4(world_pos,1.0);
void main()
{
vec3 world_pos = uMdl * vec4( a_co, 1.0 );
gl_Position = uPv * vec4(world_pos,1.0);
- vec2 depth_coords = (world_pos.xz-uDepthBounds.xy)*uDepthBounds.zw;
aUv = vec4(world_pos.xz*0.005,depth_coords);
aCo = world_pos;
aUv = vec4(world_pos.xz*0.005,depth_coords);
aCo = world_pos;
-
- aDepth = gl_Position.z;
}
}