diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 11d5bcb207..dc9006a4e1 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -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); + } } } |