mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-06 04:23:34 +00:00
Fix Command Queue Crash
* No longer allow sending an object (texture) to the server as material parameter * Keep a parameter cache locally in ShaderMaterial
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user