diff options
Diffstat (limited to 'servers/rendering/rasterizer.h')
-rw-r--r-- | servers/rendering/rasterizer.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/servers/rendering/rasterizer.h b/servers/rendering/rasterizer.h index efaa8f138a..4df140f8c3 100644 --- a/servers/rendering/rasterizer.h +++ b/servers/rendering/rasterizer.h @@ -752,6 +752,9 @@ public: virtual void render_target_disable_clear_request(RID p_render_target) = 0; virtual void render_target_do_clear_request(RID p_render_target) = 0; + virtual void render_target_set_sdf_size_and_scale(RID p_render_target, RS::ViewportSDFOversize p_size, RS::ViewportSDFScale p_scale) = 0; + virtual Rect2i render_target_get_sdf_rect(RID p_render_target) const = 0; + virtual RS::InstanceType get_base_type(RID p_rid) const = 0; virtual bool free(RID p_rid) = 0; @@ -809,7 +812,6 @@ public: static RasterizerCanvas *singleton; enum CanvasRectFlags { - CANVAS_RECT_REGION = 1, CANVAS_RECT_TILE = 2, CANVAS_RECT_FLIP_H = 4, @@ -943,7 +945,6 @@ public: struct Command { enum Type { - TYPE_RECT, TYPE_NINEPATCH, TYPE_POLYGON, @@ -1326,7 +1327,7 @@ public: } }; - virtual void canvas_render_items(RID p_to_render_target, Item *p_item_list, const Color &p_modulate, Light *p_light_list, Light *p_directional_list, const Transform2D &p_canvas_transform, RS::CanvasItemTextureFilter p_default_filter, RS::CanvasItemTextureRepeat p_default_repeat, bool p_snap_2d_vertices_to_pixel) = 0; + virtual void canvas_render_items(RID p_to_render_target, Item *p_item_list, const Color &p_modulate, Light *p_light_list, Light *p_directional_list, const Transform2D &p_canvas_transform, RS::CanvasItemTextureFilter p_default_filter, RS::CanvasItemTextureRepeat p_default_repeat, bool p_snap_2d_vertices_to_pixel, bool &r_sdf_used) = 0; virtual void canvas_debug_viewport_shadows(Light *p_lights_with_shadow) = 0; struct LightOccluderInstance { @@ -1338,12 +1339,14 @@ public: Transform2D xform; Transform2D xform_cache; int light_mask; + bool sdf_collision; RS::CanvasOccluderPolygonCullMode cull_cache; LightOccluderInstance *next; LightOccluderInstance() { enabled = true; + sdf_collision = false; next = nullptr; light_mask = 1; cull_cache = RS::CANVAS_OCCLUDER_POLYGON_CULL_DISABLED; @@ -1356,8 +1359,10 @@ public: virtual void light_update_shadow(RID p_rid, int p_shadow_index, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, LightOccluderInstance *p_occluders) = 0; virtual void light_update_directional_shadow(RID p_rid, int p_shadow_index, const Transform2D &p_light_xform, int p_light_mask, float p_cull_distance, const Rect2 &p_clip_rect, LightOccluderInstance *p_occluders) = 0; + virtual void render_sdf(RID p_render_target, LightOccluderInstance *p_occluders) = 0; + virtual RID occluder_polygon_create() = 0; - virtual void occluder_polygon_set_shape_as_lines(RID p_occluder, const Vector<Vector2> &p_lines) = 0; + virtual void occluder_polygon_set_shape(RID p_occluder, const Vector<Vector2> &p_points, bool p_closed) = 0; virtual void occluder_polygon_set_cull_mode(RID p_occluder, RS::CanvasOccluderPolygonCullMode p_mode) = 0; virtual void set_shadow_texture_size(int p_size) = 0; |