diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-23 09:47:24 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-23 09:47:24 +0100 |
commit | 1cab6c91e97b6371247afaf4de016ef6b83efcb0 (patch) | |
tree | 819f6ab8ebf5b1d323202475074574d4edfbfa2b /servers/rendering/renderer_geometry_instance.h | |
parent | ae4c025da9598f3d9efbda8008d4ac7fb5b3ba63 (diff) | |
parent | 6f4f38db07c901a8b7dc74ad871af98030336031 (diff) |
Merge pull request #69998 from BastiaanOlij/sorting-pivot-4
Added options for sorting transparent objects (port of PR #63040)
Diffstat (limited to 'servers/rendering/renderer_geometry_instance.h')
-rw-r--r-- | servers/rendering/renderer_geometry_instance.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/servers/rendering/renderer_geometry_instance.h b/servers/rendering/renderer_geometry_instance.h index fecb9878c2..37fde9e1f6 100644 --- a/servers/rendering/renderer_geometry_instance.h +++ b/servers/rendering/renderer_geometry_instance.h @@ -50,6 +50,7 @@ public: virtual void set_surface_materials(const Vector<RID> &p_materials) = 0; virtual void set_mesh_instance(RID p_mesh_instance) = 0; virtual void set_transform(const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) = 0; + virtual void set_pivot_data(float p_sorting_offset, bool p_use_aabb_center) = 0; virtual void set_lod_bias(float p_lod_bias) = 0; virtual void set_layer_mask(uint32_t p_layer_mask) = 0; virtual void set_fade_range(bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) = 0; @@ -86,11 +87,13 @@ public: RID mesh_instance; Transform3D transform; - bool mirror = false; // move into data? - AABB transformed_aabb; //needed for LOD + bool mirror = false; + AABB transformed_aabb; bool non_uniform_scale = false; float lod_model_scale = 1.0; float lod_bias = 0.0; + float sorting_offset = 0.0; + bool use_aabb_center = true; uint32_t layer_mask = 1; @@ -133,6 +136,7 @@ public: virtual void set_surface_materials(const Vector<RID> &p_materials) override; virtual void set_mesh_instance(RID p_mesh_instance) override; virtual void set_transform(const Transform3D &p_transform, const AABB &p_aabb, const AABB &p_transformed_aabb) override; + virtual void set_pivot_data(float p_sorting_offset, bool p_use_aabb_center) override; virtual void set_lod_bias(float p_lod_bias) override; virtual void set_layer_mask(uint32_t p_layer_mask) override; virtual void set_fade_range(bool p_enable_near, float p_near_begin, float p_near_end, bool p_enable_far, float p_far_begin, float p_far_end) override; |