From af62d15ebc24351a81832990c10dade161cef02f Mon Sep 17 00:00:00 2001 From: GuoShuangyi Date: Thu, 4 Jul 2024 17:38:14 +0800 Subject: [PATCH] fix depth_prepass_alpha not work in compatibility mode --- drivers/gles3/rasterizer_scene_gles3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 8e89889fd12..d637128c9e1 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -1420,7 +1420,7 @@ void RasterizerSceneGLES3::_fill_render_list(RenderListType p_render_list, const #else bool force_alpha = false; #endif - if (!force_alpha && (surf->flags & GeometryInstanceSurface::FLAG_PASS_OPAQUE)) { + if (!force_alpha && (surf->flags & (GeometryInstanceSurface::FLAG_PASS_DEPTH | GeometryInstanceSurface::FLAG_PASS_OPAQUE))) { rl->add_element(surf); } if (force_alpha || (surf->flags & GeometryInstanceSurface::FLAG_PASS_ALPHA)) {