Fix #144213: Overlay: Transparency ordering issue in texture paint

Caused by missing depth of in front objects in in-front buffer.
Forcing a depth prepass fixes the issue.
This commit is contained in:
Clément Foucault
2025-09-08 12:54:56 +02:00
parent 62912594d1
commit ff468e44ee

View File

@@ -1091,7 +1091,9 @@ bool Instance::object_needs_prepass(const ObjectRef &ob_ref, bool in_paint_mode)
if (in_paint_mode) {
/* Allow paint overlays to draw with depth equal test. */
if (object_is_rendered_transparent(ob_ref.object, state)) {
if (object_is_rendered_transparent(ob_ref.object, state) ||
object_is_in_front(ob_ref.object, state))
{
return true;
}
}