From f8314cc610dd3d76e6cbddc6540dafe51c7cee0f Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Fri, 19 Sep 2025 18:19:09 -0700 Subject: [PATCH] Set non-unique material to submesh when updating cast shadows property (#3085) Signed-off-by: Ian Chen (cherry picked from commit 40dbdebdc0e51cf58aa8e71fbbb95e0e9b0dcf3e) --- src/rendering/SceneManager.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rendering/SceneManager.cc b/src/rendering/SceneManager.cc index c1aefe8918..7765297894 100644 --- a/src/rendering/SceneManager.cc +++ b/src/rendering/SceneManager.cc @@ -397,10 +397,10 @@ rendering::VisualPtr SceneManager::CreateVisual(Entity _id, // unlike setting transparency above, the parent submesh are not // notified about the the cast shadows changes. So we need to set // the material back to the submesh. - // \todo(anyone) find way to propate cast shadows changes tos submesh + // \todo(anyone) find way to propagate cast shadows changes to submesh // in gz-rendering submeshMat->SetCastShadows(_visual.CastShadows()); - submesh->SetMaterial(submeshMat); + submesh->SetMaterial(submeshMat, false); } } }