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/effects/copy_effects.h | |
parent | 49cc12bf89689c35f0d867790a25fb3112899a6d (diff) | |
download | redot-engine-21ac6d7d8e704eb5e624a17b8e3991d63c22e4a9.tar.gz |
Finish implementing Canvas Background mode
Diffstat (limited to 'servers/rendering/renderer_rd/effects/copy_effects.h')
-rw-r--r-- | servers/rendering/renderer_rd/effects/copy_effects.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/servers/rendering/renderer_rd/effects/copy_effects.h b/servers/rendering/renderer_rd/effects/copy_effects.h index cda4f70730..83f7a51a36 100644 --- a/servers/rendering/renderer_rd/effects/copy_effects.h +++ b/servers/rendering/renderer_rd/effects/copy_effects.h @@ -181,16 +181,21 @@ private: COPY_TO_FB_MAX, }; + enum CopyToFBFlags { + COPY_TO_FB_FLAG_FLIP_Y = (1 << 0), + COPY_TO_FB_FLAG_USE_SECTION = (1 << 1), + COPY_TO_FB_FLAG_FORCE_LUMINANCE = (1 << 2), + COPY_TO_FB_FLAG_ALPHA_TO_ZERO = (1 << 3), + COPY_TO_FB_FLAG_SRGB = (1 << 4), + COPY_TO_FB_FLAG_ALPHA_TO_ONE = (1 << 5), + COPY_TO_FB_FLAG_LINEAR = (1 << 6), + }; + struct CopyToFbPushConstant { float section[4]; float pixel_size[2]; - uint32_t flip_y; - uint32_t use_section; - - uint32_t force_luminance; - uint32_t alpha_to_zero; - uint32_t srgb; - uint32_t alpha_to_one; + float luminance_multiplier; + uint32_t flags; float set_color[4]; }; @@ -322,7 +327,7 @@ public: void copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panorama, const Size2i &p_panorama_size, float p_lod, bool p_is_array); void copy_depth_to_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y = false); void copy_depth_to_rect_and_linearize(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, float p_z_near, float p_z_far); - void copy_to_fb_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y = false, bool p_force_luminance = false, bool p_alpha_to_zero = false, bool p_srgb = false, RID p_secondary = RID(), bool p_multiview = false, bool alpha_to_one = false); + void copy_to_fb_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y = false, bool p_force_luminance = false, bool p_alpha_to_zero = false, bool p_srgb = false, RID p_secondary = RID(), bool p_multiview = false, bool alpha_to_one = false, bool p_linear = false); void copy_to_atlas_fb(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2 &p_uv_rect, RD::DrawListID p_draw_list, bool p_flip_y = false, bool p_panorama = false); void copy_raster(RID p_source_texture, RID p_dest_framebuffer); |