X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fscene_depth.h;h=f1c5af34368ff017a54d28f43935d47d905a7724;hb=5f01e7ab4aad052faad262b55404819dac3d25ce;hp=0a88b46f09c8e2239c5f8e4b561a19a51558e92f;hpb=a1056ed8198f0f5be0e0f341da8bd49aa6c47198;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/scene_depth.h b/shaders/scene_depth.h index 0a88b46..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"