Fix crash when opening a converted FogMaterial
This commit is contained in:
parent
75baf16bab
commit
a6ddfecc9f
1 changed files with 2 additions and 2 deletions
|
@ -3589,7 +3589,7 @@ void RendererSceneRenderRD::FogShaderData::get_instance_param_list(List<Renderer
|
||||||
p.info = ShaderLanguage::uniform_to_property_info(E->get());
|
p.info = ShaderLanguage::uniform_to_property_info(E->get());
|
||||||
p.info.name = E->key(); //supply name
|
p.info.name = E->key(); //supply name
|
||||||
p.index = E->get().instance_index;
|
p.index = E->get().instance_index;
|
||||||
p.default_value = ShaderLanguage::constant_value_to_variant(E->get().default_value, E->get().type, E->get().hint);
|
p.default_value = ShaderLanguage::constant_value_to_variant(E->get().default_value, E->get().type, E->get().array_size, E->get().hint);
|
||||||
p_param_list->push_back(p);
|
p_param_list->push_back(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3614,7 +3614,7 @@ Variant RendererSceneRenderRD::FogShaderData::get_default_parameter(const String
|
||||||
if (uniforms.has(p_parameter)) {
|
if (uniforms.has(p_parameter)) {
|
||||||
ShaderLanguage::ShaderNode::Uniform uniform = uniforms[p_parameter];
|
ShaderLanguage::ShaderNode::Uniform uniform = uniforms[p_parameter];
|
||||||
Vector<ShaderLanguage::ConstantNode::Value> default_value = uniform.default_value;
|
Vector<ShaderLanguage::ConstantNode::Value> default_value = uniform.default_value;
|
||||||
return ShaderLanguage::constant_value_to_variant(default_value, uniform.type, uniform.hint);
|
return ShaderLanguage::constant_value_to_variant(default_value, uniform.type, uniform.array_size, uniform.hint);
|
||||||
}
|
}
|
||||||
return Variant();
|
return Variant();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue