diff --git a/Assets/raymarched/lib/libgarbage.cginc b/Assets/raymarched/lib/libgarbage.cginc index 8e4b87d..22167e1 100644 --- a/Assets/raymarched/lib/libgarbage.cginc +++ b/Assets/raymarched/lib/libgarbage.cginc @@ -211,7 +211,7 @@ FragOut frag (V2F i) { depth_point = i.hit_pos; #ifdef LIMIT_DEPTH_TO_MESH - if (length(i.cam_pos - first_hit) > length(i.cam_pos - i.hit_pos)) + if (length(i.cam_pos - first_hit * SCENE_SCALE) > length(i.cam_pos - i.hit_pos)) depth_point = i.hit_pos; #endif