1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix bug where material with double-sided shadows ignores backface culling on compatibility renderer

This commit is contained in:
João Pedro Xavier
2025-08-19 20:07:47 -07:00
parent 28bd72a7e1
commit d6aca93c1a

View File

@@ -3200,7 +3200,7 @@ void RasterizerSceneGLES3::_render_list_template(RenderListParameters *p_params,
// Find cull variant.
RS::CullMode cull_mode = shader->cull_mode;
if (p_pass_mode == PASS_MODE_MATERIAL || (surf->flags & GeometryInstanceSurface::FLAG_USES_DOUBLE_SIDED_SHADOWS)) {
if (p_pass_mode == PASS_MODE_MATERIAL || (p_pass_mode == PASS_MODE_SHADOW && (surf->flags & GeometryInstanceSurface::FLAG_USES_DOUBLE_SIDED_SHADOWS))) {
cull_mode = RS::CULL_MODE_DISABLED;
} else {
bool mirror = inst->mirror;