From fb92c7b0fa7faf0f69b5da0bef3fcc2350fd832e Mon Sep 17 00:00:00 2001 From: JFonS Date: Fri, 16 Nov 2018 12:20:23 +0100 Subject: Use hint_color when getting shader default params --- drivers/gles2/rasterizer_storage_gles2.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/gles2') diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 060988fbea..d646500a23 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -1497,8 +1497,9 @@ Variant RasterizerStorageGLES2::material_get_param_default(RID p_material, const if (material->shader) { if (material->shader->uniforms.has(p_param)) { - Vector default_value = material->shader->uniforms[p_param].default_value; - return ShaderLanguage::constant_value_to_variant(default_value, material->shader->uniforms[p_param].type); + ShaderLanguage::ShaderNode::Uniform uniform = material->shader->uniforms[p_param]; + Vector default_value = uniform.default_value; + return ShaderLanguage::constant_value_to_variant(default_value, uniform.type, uniform.hint); } } return Variant(); -- cgit v1.2.3