diff options
Diffstat (limited to 'scene/3d/visual_instance_3d.h')
-rw-r--r-- | scene/3d/visual_instance_3d.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/scene/3d/visual_instance_3d.h b/scene/3d/visual_instance_3d.h index 8d24e13d47..acdbc4666a 100644 --- a/scene/3d/visual_instance_3d.h +++ b/scene/3d/visual_instance_3d.h @@ -101,6 +101,12 @@ public: LIGHTMAP_SCALE_MAX, }; + enum VisibilityRangeFadeMode { + VISIBILITY_RANGE_FADE_DISABLED = RS::VISIBILITY_RANGE_FADE_DISABLED, + VISIBILITY_RANGE_FADE_SELF = RS::VISIBILITY_RANGE_FADE_SELF, + VISIBILITY_RANGE_FADE_DEPENDENCIES = RS::VISIBILITY_RANGE_FADE_DEPENDENCIES, + }; + private: ShadowCastingSetting shadow_casting_setting = SHADOW_CASTING_SETTING_ON; Ref<Material> material_override; @@ -109,8 +115,9 @@ private: float visibility_range_end = 0.0; float visibility_range_begin_margin = 0.0; float visibility_range_end_margin = 0.0; + VisibilityRangeFadeMode visibility_range_fade_mode = VISIBILITY_RANGE_FADE_DISABLED; - Vector<NodePath> visibility_range_children; + float transparency = 0.0f; float lod_bias = 1.0; @@ -136,6 +143,9 @@ public: void set_cast_shadows_setting(ShadowCastingSetting p_shadow_casting_setting); ShadowCastingSetting get_cast_shadows_setting() const; + void set_transparecy(float p_transparency); + float get_transparency() const; + void set_visibility_range_begin(float p_dist); float get_visibility_range_begin() const; @@ -148,8 +158,8 @@ public: void set_visibility_range_end_margin(float p_dist); float get_visibility_range_end_margin() const; - void set_visibility_range_parent(const Node *p_parent); - void clear_visibility_range_parent(); + void set_visibility_range_fade_mode(VisibilityRangeFadeMode p_mode); + VisibilityRangeFadeMode get_visibility_range_fade_mode() const; void set_material_override(const Ref<Material> &p_material); Ref<Material> get_material_override() const; @@ -181,5 +191,6 @@ public: VARIANT_ENUM_CAST(GeometryInstance3D::ShadowCastingSetting); VARIANT_ENUM_CAST(GeometryInstance3D::LightmapScale); VARIANT_ENUM_CAST(GeometryInstance3D::GIMode); +VARIANT_ENUM_CAST(GeometryInstance3D::VisibilityRangeFadeMode); #endif |