Properly initialize color hinted vec4 uniforms to 0,0,0,1 fixes #9354
This commit is contained in:
parent
f6c39830cb
commit
831e21e89b
1 changed files with 7 additions and 1 deletions
|
@ -2497,7 +2497,13 @@ void RasterizerStorageGLES3::_update_material(Material *material) {
|
|||
//value=E->get().default_value;
|
||||
} else {
|
||||
//zero because it was not provided
|
||||
_fill_std140_ubo_empty(E->get().type, data);
|
||||
if (E->get().type == ShaderLanguage::TYPE_VEC4 && E->get().hint == ShaderLanguage::ShaderNode::Uniform::HINT_COLOR) {
|
||||
//colors must be set as black, with alpha as 1.0
|
||||
_fill_std140_variant_ubo_value(E->get().type, Color(0, 0, 0, 1), data, material->shader->mode == VS::SHADER_SPATIAL);
|
||||
} else {
|
||||
//else just zero it out
|
||||
_fill_std140_ubo_empty(E->get().type, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue