summaryrefslogtreecommitdiff
path: root/servers/rendering/rasterizer_rd/rasterizer_canvas_rd.h
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2020-10-28 15:34:27 -0300
committerreduz <reduzio@gmail.com>2020-10-28 18:53:32 -0300
commit8ab9b397070174aab7b20cdcd97506db25fb919d (patch)
tree521d77e32b056dee703eb96ecbb54ab939f19c6a /servers/rendering/rasterizer_rd/rasterizer_canvas_rd.h
parent2eaedcf14e515eb589885025b46d0aedc492830a (diff)
Implement CanvasGroup and CanvasItem clipping
-Allows merging several 2D objects into a single draw operation -Use current node to clip children nodes -Further fixes to Vulkan barriers -Changed font texture generation to white, fixes dark eges when blurred -Other small misc fixes to backbuffer code.
Diffstat (limited to 'servers/rendering/rasterizer_rd/rasterizer_canvas_rd.h')
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_canvas_rd.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/servers/rendering/rasterizer_rd/rasterizer_canvas_rd.h b/servers/rendering/rasterizer_rd/rasterizer_canvas_rd.h
index 5791efa4e5..4a79134c24 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_canvas_rd.h
+++ b/servers/rendering/rasterizer_rd/rasterizer_canvas_rd.h
@@ -391,6 +391,9 @@ class RasterizerCanvasRD : public RasterizerCanvas {
RID default_canvas_texture;
+ RID default_canvas_group_shader;
+ RID default_canvas_group_material;
+
RS::CanvasItemTextureFilter default_filter = RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR;
RS::CanvasItemTextureRepeat default_repeat = RS::CANVAS_ITEM_TEXTURE_REPEAT_DISABLED;
@@ -398,7 +401,7 @@ class RasterizerCanvasRD : public RasterizerCanvas {
inline void _bind_canvas_texture(RD::DrawListID p_draw_list, RID p_texture, RS::CanvasItemTextureFilter p_base_filter, RS::CanvasItemTextureRepeat p_base_repeat, RID &r_last_texture, PushConstant &push_constant, Size2 &r_texpixel_size); //recursive, so regular inline used instead.
void _render_item(RenderingDevice::DrawListID p_draw_list, const Item *p_item, RenderingDevice::FramebufferFormatID p_framebuffer_format, const Transform2D &p_canvas_transform_inverse, Item *&current_clip, Light *p_lights, PipelineVariants *p_pipeline_variants);
- void _render_items(RID p_to_render_target, int p_item_count, const Transform2D &p_canvas_transform_inverse, Light *p_lights);
+ void _render_items(RID p_to_render_target, int p_item_count, const Transform2D &p_canvas_transform_inverse, Light *p_lights, bool p_to_backbuffer = false);
_FORCE_INLINE_ void _update_transform_2d_to_mat2x4(const Transform2D &p_transform, float *p_mat2x4);
_FORCE_INLINE_ void _update_transform_2d_to_mat2x3(const Transform2D &p_transform, float *p_mat2x3);