Fixed unnecesary structure copying in bugfix.

This commit is contained in:
Juan Linietsky 2017-10-20 16:13:22 -03:00
parent 0e9f81a40b
commit efe9a6ff5a

View file

@ -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;
}