Merge pull request #74349 from JohanAR/fix-instance-uniforms

Fix instance uniforms breaking when setting a new mesh.
This commit is contained in:
Rémi Verschelde 2023-03-08 08:55:48 +01:00
commit 1a5239ff1e
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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());