diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-10-20 16:13:22 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-10-20 16:13:48 -0300 |
commit | efe9a6ff5a55e1533a223dbaf43e7b7c20810b33 (patch) | |
tree | c6c6b677ff7bcf56bf4c6672196495ca9e33998f /drivers | |
parent | 0e9f81a40bfb64aef242cc801aabb97a620b178e (diff) |
Fixed unnecesary structure copying in bugfix.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index ae4a9d2a03..296d945cda 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -2430,9 +2430,8 @@ void RasterizerStorageGLES3::_update_material(Material *material) { if (material->shader && material->shader->mode == VS::SHADER_SPATIAL) { - Shader::Spatial spatial = material->shader->spatial; - if (spatial.blend_mode == Shader::Spatial::BLEND_MODE_MIX && - (!spatial.uses_alpha || (spatial.uses_alpha && spatial.depth_draw_mode == Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS))) { + if (material->shader->spatial.blend_mode == Shader::Spatial::BLEND_MODE_MIX && + (!material->shader->spatial.uses_alpha || (material->shader->spatial.uses_alpha && material->shader->spatial.depth_draw_mode == Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS))) { can_cast_shadow = true; } |