X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fcommon_world.glsl;fp=shaders%2Fcommon_world.glsl;h=2b708858895c4afc8685bec62825c5529a1787d2;hb=2673c575386c604fc2c0603dba2480eda05cf97a;hp=5c06d73db33caf07636035c02042dd0a7a7388da;hpb=66b3ec9c538fefd79c2de08e0dcdf070b4331885;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/common_world.glsl b/shaders/common_world.glsl index 5c06d73..2b70885 100644 --- a/shaders/common_world.glsl +++ b/shaders/common_world.glsl @@ -48,9 +48,8 @@ float world_depth_sample( vec3 pos ) float world_water_depth( vec3 pos ) { - vec2 depth_coord = (pos.xz - g_depth_bounds.xy) * g_depth_bounds.zw; float ref_depth = g_water_plane.y*g_water_plane.w; - return texture( g_world_depth, depth_coord ).g - ref_depth; + return world_depth_sample( pos ) - ref_depth; } float shadow_sample( vec3 vdir )