summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorJohan Aires Rastén <johan@oljud.se>2023-03-04 11:49:18 +0100
committerYuri Sizov <yuris@humnom.net>2023-03-14 13:59:03 +0100
commit4ff705b37eca3b8de2acf5919caf2324cba9c49d (patch)
treeb17fe6d2bb8fec8f792cd47234af0683c8194a7b /servers
parent47dc4bc3072208b973d2a0d26c8f9502e09c7f40 (diff)
Fix instance uniforms breaking when setting a new mesh.
Fixes #58113 (cherry picked from commit 26aecbfe572c7c1164cfb36088aaf443a73f99df)
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/renderer_scene_cull.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp
index 813c1fa4ff..6a872da69e 100644
--- a/servers/rendering/renderer_scene_cull.cpp
+++ b/servers/rendering/renderer_scene_cull.cpp
@@ -653,6 +653,7 @@ void RendererSceneCull::instance_set_base(RID p_instance, RID p_base) {
geom->geometry_instance->set_use_baked_light(instance->baked_light);
geom->geometry_instance->set_use_dynamic_gi(instance->dynamic_gi);
geom->geometry_instance->set_use_lightmap(RID(), instance->lightmap_uv_scale, instance->lightmap_slice_index);
+ geom->geometry_instance->set_instance_shader_uniforms_offset(instance->instance_allocated_shader_uniforms_offset);
geom->geometry_instance->set_cast_double_sided_shadows(instance->cast_shadows == RS::SHADOW_CASTING_SETTING_DOUBLE_SIDED);
if (instance->lightmap_sh.size() == 9) {
geom->geometry_instance->set_lightmap_capture(instance->lightmap_sh.ptr());