diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-04-05 13:40:26 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-04-06 14:34:37 +0300 |
commit | f851c4aa330e1064a66db50be62db2466f4fb768 (patch) | |
tree | 70f3bd487e91feb4ca777dba214a09b17041da97 /drivers/gles3/storage/material_storage.cpp | |
parent | 72407a9cfbd4f58102972c0910429f3ab7006f07 (diff) |
Fix some issues found by cppcheck.
Diffstat (limited to 'drivers/gles3/storage/material_storage.cpp')
-rw-r--r-- | drivers/gles3/storage/material_storage.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index f773a6160a..e519c428d2 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -576,10 +576,10 @@ void MaterialStorage::_update_material(Material *p_material) { } { - bool can_cast_shadow = false; - bool is_animated = false; - if (p_material->shader && p_material->shader->mode == RS::SHADER_SPATIAL) { + bool can_cast_shadow = false; + bool is_animated = false; + if (p_material->shader->spatial.blend_mode == Shader::Spatial::BLEND_MODE_MIX && (!p_material->shader->spatial.uses_alpha || p_material->shader->spatial.depth_draw_mode == Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS)) { can_cast_shadow = true; |