X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fscene_depth.h;h=f1c5af34368ff017a54d28f43935d47d905a7724;hb=01e2535f8daaab0e3d46dcc61a08a9268babd47c;hp=8e836e40a6aa617da6ed143d14507a81e19ed4a9;hpb=2673c575386c604fc2c0603dba2480eda05cf97a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/scene_depth.h b/shaders/scene_depth.h index 8e836e4..f1c5af3 100644 --- a/shaders/scene_depth.h +++ b/shaders/scene_depth.h @@ -205,9 +205,8 @@ static struct vg_shader _shader_scene_depth = { "\n" "float world_water_depth( vec3 pos )\n" "{\n" -" vec2 depth_coord = (pos.xz - g_depth_bounds.xy) * g_depth_bounds.zw; \n" " float ref_depth = g_water_plane.y*g_water_plane.w;\n" -" return texture( g_world_depth, depth_coord ).g-ref_depth;\n" +" return world_depth_sample( pos ) - ref_depth;\n" "}\n" "\n" "float shadow_sample( vec3 vdir )\n"