diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-01-24 12:24:53 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-01-24 12:24:53 +0200 |
commit | 1c774a608314f4915791c9d9e4ab5d9c5485813f (patch) | |
tree | 1cc2f2c71eb9710c4a9613c5ee8d0d8b6bf09e8c /scene/3d/label_3d.h | |
parent | 4fa6edc888cfacd5346bf08afa14b5f5a9bd6d0c (diff) | |
download | redot-engine-1c774a608314f4915791c9d9e4ab5d9c5485813f.tar.gz |
Fix unsafe murmur3 hash use for the default material keys, expose alpha hash transparency mode for default materials and Label3D and Sprite3D.
Diffstat (limited to 'scene/3d/label_3d.h')
-rw-r--r-- | scene/3d/label_3d.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scene/3d/label_3d.h b/scene/3d/label_3d.h index 96cc941209..576735840a 100644 --- a/scene/3d/label_3d.h +++ b/scene/3d/label_3d.h @@ -51,7 +51,9 @@ public: enum AlphaCutMode { ALPHA_CUT_DISABLED, ALPHA_CUT_DISCARD, - ALPHA_CUT_OPAQUE_PREPASS + ALPHA_CUT_OPAQUE_PREPASS, + ALPHA_CUT_HASH, + ALPHA_CUT_MAX }; private: @@ -59,6 +61,7 @@ private: bool flags[FLAG_MAX] = {}; AlphaCutMode alpha_cut = ALPHA_CUT_DISABLED; float alpha_scissor_threshold = 0.5; + float alpha_hash_scale = 1.0; AABB aabb; @@ -228,6 +231,9 @@ public: void set_alpha_scissor_threshold(float p_threshold); float get_alpha_scissor_threshold() const; + void set_alpha_hash_scale(float p_hash_scale); + float get_alpha_hash_scale() const; + void set_billboard_mode(StandardMaterial3D::BillboardMode p_mode); StandardMaterial3D::BillboardMode get_billboard_mode() const; |