diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-07 16:36:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-07 16:36:13 +0200 |
commit | 48a52268291d2dc48377c51f1b43e0a9d830057e (patch) | |
tree | 2e77e9f8d1b226c63f06886d7eda1cf1bbb87ae4 /scene/3d/visual_instance_3d.cpp | |
parent | f62da984afbe1e689d2dae0acb49eb783672de27 (diff) | |
parent | d41e3f9aebf294ccb6238795b8cfb3c815ea3a93 (diff) |
Merge pull request #50193 from reduz/fix-command-queue-crash
Fix Command Queue Crash
Diffstat (limited to 'scene/3d/visual_instance_3d.cpp')
-rw-r--r-- | scene/3d/visual_instance_3d.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp index 2bc2371f68..bd47af8100 100644 --- a/scene/3d/visual_instance_3d.cpp +++ b/scene/3d/visual_instance_3d.cpp @@ -293,7 +293,12 @@ void GeometryInstance3D::set_shader_instance_uniform(const StringName &p_uniform instance_uniforms.erase(p_value); } else { instance_uniforms[p_uniform] = p_value; - RS::get_singleton()->instance_geometry_set_shader_parameter(get_instance(), p_uniform, p_value); + if (p_value.get_type() == Variant::OBJECT) { + RID tex_id = p_value; + RS::get_singleton()->instance_geometry_set_shader_parameter(get_instance(), p_uniform, tex_id); + } else { + RS::get_singleton()->instance_geometry_set_shader_parameter(get_instance(), p_uniform, p_value); + } } } |