X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fwater.vs;h=6fbee776615a0dae1f21d03f355d4ca4bba80bcd;hb=bdac014448b6ec968fe645f1581f321144f07dba;hp=c8ac51bcefa266db568a8c12b23ad7895c2bdf1a;hpb=dfee9022b3513fddec36f7ea70867ee5961a44da;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/water.vs b/shaders/water.vs index c8ac51b..6fbee77 100644 --- a/shaders/water.vs +++ b/shaders/water.vs @@ -2,20 +2,15 @@ uniform mat4 uPv; uniform mat4x3 uMdl; -uniform vec4 uDepthBounds; 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); - vec2 depth_coords = (world_pos.xz-uDepthBounds.xy)*uDepthBounds.zw; - aUv = vec4(world_pos.xz*0.01,depth_coords); + aUv = vec4(world_pos.xz*0.005,depth_coords); aCo = world_pos; - - aDepth = gl_Position.z; }