diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-07-10 17:44:55 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-11 11:53:28 +0100 |
commit | ef083a583b3bd833d36fadb80a9ee8e9081d394e (patch) | |
tree | b26b4497b8f1b6f6442121ae0181a3038500df59 /scene/2d | |
parent | a3f8ffac63a95d0ebcbe2f0b864e0ea33d29e1d3 (diff) |
Modified light rendering to make it more compatible.
Modified polygon management to make it more compatible with MoltenVK
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/light_2d.cpp | 16 | ||||
-rw-r--r-- | scene/2d/light_2d.h | 4 |
2 files changed, 0 insertions, 20 deletions
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index f163e588ec..0b66d34ece 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -296,17 +296,6 @@ int Light2D::get_shadow_buffer_size() const { return shadow_buffer_size; } -void Light2D::set_shadow_gradient_length(float p_multiplier) { - - shadow_gradient_length = p_multiplier; - VS::get_singleton()->canvas_light_set_shadow_gradient_length(canvas_light, p_multiplier); -} - -float Light2D::get_shadow_gradient_length() const { - - return shadow_gradient_length; -} - void Light2D::set_shadow_filter(ShadowFilter p_filter) { ERR_FAIL_INDEX(p_filter, SHADOW_FILTER_MAX); shadow_filter = p_filter; @@ -427,9 +416,6 @@ void Light2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_shadow_smooth", "smooth"), &Light2D::set_shadow_smooth); ClassDB::bind_method(D_METHOD("get_shadow_smooth"), &Light2D::get_shadow_smooth); - ClassDB::bind_method(D_METHOD("set_shadow_gradient_length", "multiplier"), &Light2D::set_shadow_gradient_length); - ClassDB::bind_method(D_METHOD("get_shadow_gradient_length"), &Light2D::get_shadow_gradient_length); - ClassDB::bind_method(D_METHOD("set_shadow_filter", "filter"), &Light2D::set_shadow_filter); ClassDB::bind_method(D_METHOD("get_shadow_filter"), &Light2D::get_shadow_filter); @@ -456,7 +442,6 @@ void Light2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_enabled"), "set_shadow_enabled", "is_shadow_enabled"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_buffer_size", PROPERTY_HINT_RANGE, "32,16384,1"), "set_shadow_buffer_size", "get_shadow_buffer_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_gradient_length", PROPERTY_HINT_RANGE, "0,4096,0.1"), "set_shadow_gradient_length", "get_shadow_gradient_length"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_filter", PROPERTY_HINT_ENUM, "None,PCF5,PCF13"), "set_shadow_filter", "get_shadow_filter"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_item_cull_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_item_shadow_cull_mask", "get_item_shadow_cull_mask"); @@ -488,7 +473,6 @@ Light2D::Light2D() { item_shadow_mask = 1; mode = MODE_ADD; shadow_buffer_size = 2048; - shadow_gradient_length = 0; energy = 1.0; shadow_color = Color(0, 0, 0, 0); shadow_filter = SHADOW_FILTER_NONE; diff --git a/scene/2d/light_2d.h b/scene/2d/light_2d.h index 03335c26fe..7134029441 100644 --- a/scene/2d/light_2d.h +++ b/scene/2d/light_2d.h @@ -70,7 +70,6 @@ private: int item_shadow_mask; int shadow_buffer_size; float shadow_smooth; - float shadow_gradient_length; Mode mode; Ref<Texture2D> texture; Vector2 texture_offset; @@ -147,9 +146,6 @@ public: void set_shadow_buffer_size(int p_size); int get_shadow_buffer_size() const; - void set_shadow_gradient_length(float p_multiplier); - float get_shadow_gradient_length() const; - void set_shadow_filter(ShadowFilter p_filter); ShadowFilter get_shadow_filter() const; |