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

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

(cherry picked from commit d6aca93c1a)
This commit is contained in:
João Pedro Xavier
2025-08-19 20:07:47 -07:00
committed by Thaddeus Crews
parent 82fc85aae9
commit d78a95f971

View File

@@ -3124,7 +3124,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;