libgarbage: fix depth when using LIMIT_DEPTH_TO_MESH with SCENE_SCALE

This commit is contained in:
Crispy 2023-07-29 17:17:31 +02:00
parent 633680777a
commit ffdaf36ebc

View file

@ -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