diff options
author | clayjohn <claynjohn@gmail.com> | 2022-11-17 12:36:47 -0800 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2022-11-17 12:51:26 -0800 |
commit | 21ac6d7d8e704eb5e624a17b8e3991d63c22e4a9 (patch) | |
tree | 17bb99e732cbd8e22e9636939b532606ceb7bc73 /servers/rendering/renderer_rd/forward_mobile | |
parent | 49cc12bf89689c35f0d867790a25fb3112899a6d (diff) |
Finish implementing Canvas Background mode
Diffstat (limited to 'servers/rendering/renderer_rd/forward_mobile')
-rw-r--r-- | servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp index 558aba62e1..2506f4578b 100644 --- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp +++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp @@ -796,6 +796,11 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color draw_sky = true; } break; case RS::ENV_BG_CANVAS: { + if (rb.is_valid()) { + RID dest_framebuffer = rb_data->get_color_fbs(RenderBufferDataForwardMobile::FB_CONFIG_ONE_PASS); + RID texture = RendererRD::TextureStorage::get_singleton()->render_target_get_rd_texture(rb->get_render_target()); + copy_effects->copy_to_fb_rect(texture, dest_framebuffer, Rect2i(), false, false, false, false, RID(), false, false, true); + } keep_color = true; } break; case RS::ENV_BG_KEEP: { |