Merge pull request #54376 from Chaosus/fix_converted_fogmaterial_crash

This commit is contained in:
Rémi Verschelde 2021-10-29 15:43:36 +02:00 committed by GitHub
commit b71270e6ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3589,7 +3589,7 @@ void RendererSceneRenderRD::FogShaderData::get_instance_param_list(List<Renderer
p.info = ShaderLanguage::uniform_to_property_info(E->get());
p.info.name = E->key(); //supply name
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);
}
}
@ -3614,7 +3614,7 @@ Variant RendererSceneRenderRD::FogShaderData::get_default_parameter(const String
if (uniforms.has(p_parameter)) {
ShaderLanguage::ShaderNode::Uniform uniform = uniforms[p_parameter];
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();
}