Fix: EEVEE-Next: Mesh see-through in edit mode with orthographic

The stored depth buffer was not considering orthographic
viewport cameras that have negative Z depth values.

Fix #123146
This commit is contained in:
Clément Foucault
2024-06-13 14:44:38 +02:00
parent 0100be91b6
commit f289da5bd5

View File

@@ -20,7 +20,7 @@ float film_depth_convert_to_scene(float depth)
/* TODO */
return 1.0;
}
return abs(drw_depth_screen_to_view(depth));
return -drw_depth_screen_to_view(depth);
}
/* Load a texture sample in a specific format. Combined pass needs to use this. */