diff options
author | clayjohn <claynjohn@gmail.com> | 2022-12-12 14:10:06 -0800 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-12-13 10:22:18 -0800 |
commit | bdd4001ef012c9e7a95b501225c3f6540a0299f3 (patch) | |
tree | ffd6b82a1eb19c0f322c8898e52962e1f6f8682e /drivers/gles3 | |
parent | ba4bd7f00971a94c20d90e7d2c665d5eb0ae1b90 (diff) |
Various fixes and documentation for CanvasGroup
Properly apply custom materials with CanvasGroups in the GLES3 backend
Properly blur backbuffer when using a partial rect in forward_plus and
gl_compatibility renderers
Properly set fit_margin when clear_margin is set
Fix shader error during backbuffer clear in mobile renderer
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/effects/copy_effects.cpp | 4 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_canvas_gles3.cpp | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gles3/effects/copy_effects.cpp b/drivers/gles3/effects/copy_effects.cpp index b552b52cd5..58cdc90a7c 100644 --- a/drivers/gles3/effects/copy_effects.cpp +++ b/drivers/gles3/effects/copy_effects.cpp @@ -148,8 +148,8 @@ void CopyEffects::bilinear_blur(GLuint p_source_texture, int p_mipmap_count, con dest_region.size.y = MAX(1, dest_region.size.y >> 1); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffers[i % 2]); glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, p_source_texture, i); - glBlitFramebuffer(source_region.position.x, source_region.position.y, source_region.size.x, source_region.size.y, - dest_region.position.x, dest_region.position.y, dest_region.size.x, dest_region.size.y, GL_COLOR_BUFFER_BIT, GL_LINEAR); + glBlitFramebuffer(source_region.position.x, source_region.position.y, source_region.position.x + source_region.size.x, source_region.position.y + source_region.size.y, + dest_region.position.x, dest_region.position.y, dest_region.position.x + dest_region.size.x, dest_region.position.y + dest_region.size.y, GL_COLOR_BUFFER_BIT, GL_LINEAR); glBindFramebuffer(GL_READ_FRAMEBUFFER, framebuffers[i % 2]); source_region = dest_region; } diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index c7e7227916..7b39641029 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -588,10 +588,12 @@ void RasterizerCanvasGLES3::_render_items(RID p_to_render_target, int p_item_cou material = default_clip_children_material; } } else { - if (ci->canvas_group->mode == RS::CANVAS_GROUP_MODE_CLIP_ONLY) { - material = default_clip_children_material; - } else { - material = default_canvas_group_material; + if (material.is_null()) { + if (ci->canvas_group->mode == RS::CANVAS_GROUP_MODE_CLIP_ONLY) { + material = default_clip_children_material; + } else { + material = default_canvas_group_material; + } } } } |