diff options
Diffstat (limited to 'scene/resources/material.h')
-rw-r--r-- | scene/resources/material.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/scene/resources/material.h b/scene/resources/material.h index fdb11982a8..c0e007ac5f 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -185,10 +185,10 @@ public: }; enum DiffuseMode { + DIFFUSE_BURLEY, DIFFUSE_LAMBERT, DIFFUSE_LAMBERT_WRAP, DIFFUSE_OREN_NAYAR, - DIFFUSE_BURLEY, DIFFUSE_TOON, }; @@ -232,6 +232,8 @@ private: uint64_t deep_parallax : 1; uint64_t billboard_mode : 2; uint64_t grow : 1; + uint64_t proximity_fade : 1; + uint64_t distance_fade : 1; }; uint64_t key; @@ -274,6 +276,8 @@ private: mk.billboard_mode = billboard_mode; mk.deep_parallax = deep_parallax ? 1 : 0; mk.grow = grow_enabled; + mk.proximity_fade = proximity_fade_enabled; + mk.distance_fade = distance_fade_enabled; return mk; } @@ -308,6 +312,10 @@ private: StringName uv1_blend_sharpness; StringName uv2_blend_sharpness; StringName grow; + StringName proximity_fade_distance; + StringName distance_fade_min; + StringName distance_fade_max; + StringName ao_light_affect; StringName metallic_texture_channel; StringName roughness_texture_channel; @@ -351,6 +359,7 @@ private: float point_size; float alpha_scissor_threshold; bool grow_enabled; + float ao_light_affect; float grow; int particles_anim_h_frames; int particles_anim_v_frames; @@ -370,6 +379,13 @@ private: int deep_parallax_min_layers; int deep_parallax_max_layers; + bool proximity_fade_enabled; + float proximity_fade_distance; + + bool distance_fade_enabled; + float distance_fade_max_distance; + float distance_fade_min_distance; + BlendMode blend_mode; BlendMode detail_blend_mode; DepthDrawMode depth_draw_mode; @@ -429,6 +445,9 @@ public: void set_rim_tint(float p_rim_tint); float get_rim_tint() const; + void set_ao_light_affect(float p_ao_light_affect); + float get_ao_light_affect() const; + void set_clearcoat(float p_clearcoat); float get_clearcoat() const; @@ -535,6 +554,21 @@ public: void set_on_top_of_alpha(); + void set_proximity_fade(bool p_enable); + bool is_proximity_fade_enabled() const; + + void set_proximity_fade_distance(float p_distance); + float get_proximity_fade_distance() const; + + void set_distance_fade(bool p_enable); + bool is_distance_fade_enabled() const; + + void set_distance_fade_max_distance(float p_distance); + float get_distance_fade_max_distance() const; + + void set_distance_fade_min_distance(float p_distance); + float get_distance_fade_min_distance() const; + void set_metallic_texture_channel(TextureChannel p_channel); TextureChannel get_metallic_texture_channel() const; void set_roughness_texture_channel(TextureChannel p_channel); @@ -550,6 +584,8 @@ public: static RID get_material_rid_for_2d(bool p_shaded, bool p_transparent, bool p_double_sided, bool p_cut_alpha, bool p_opaque_prepass); + RID get_shader_rid() const; + SpatialMaterial(); virtual ~SpatialMaterial(); }; |