diff options
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/rasterizer_canvas_gles3.cpp | 1 | ||||
-rw-r--r-- | drivers/gles3/shader_gles3.cpp | 8 | ||||
-rw-r--r-- | drivers/gles3/storage/material_storage.cpp | 6 |
3 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 2b8241cd40..1ddaf3d6a7 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -363,7 +363,6 @@ void RasterizerCanvasGLES3::_render_item(RID p_render_target, const Item *p_item state.instance_data_array[r_index].dst_rect[i] = 0.0; state.instance_data_array[r_index].lights[i] = uint32_t(0); } - state.instance_data_array[r_index].flags = base_flags; state.instance_data_array[r_index].color_texture_pixel_size[0] = 0.0; state.instance_data_array[r_index].color_texture_pixel_size[1] = 0.0; diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index 9349722625..4b0986cca1 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -554,11 +554,9 @@ void ShaderGLES3::_clear_version(Version *p_version) { for (int i = 0; i < variant_count; i++) { for (OAHashMap<uint64_t, Version::Specialization>::Iterator it = p_version->variants[i].iter(); it.valid; it = p_version->variants[i].next_iter(it)) { - if (it.valid) { - glDeleteShader(it.value->vert_id); - glDeleteShader(it.value->frag_id); - glDeleteProgram(it.value->id); - } + glDeleteShader(it.value->vert_id); + glDeleteShader(it.value->frag_id); + glDeleteProgram(it.value->id); } } 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; |