summaryrefslogtreecommitdiff
path: root/scene/2d/light_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/light_2d.h')
-rw-r--r--scene/2d/light_2d.h52
1 files changed, 33 insertions, 19 deletions
diff --git a/scene/2d/light_2d.h b/scene/2d/light_2d.h
index ac8d587ea7..6cfb055fa9 100644
--- a/scene/2d/light_2d.h
+++ b/scene/2d/light_2d.h
@@ -6,39 +6,36 @@
class Light2D : public Node2D {
OBJ_TYPE(Light2D,Node2D);
-public:
-
- enum LightBlendMode {
- LIGHT_BLEND_ADD,
- LIGHT_BLEND_SUB,
- LIGHT_BLEND_MULTIPLY,
- LIGHT_BLEND_DODGE,
- LIGHT_BLEND_BURN,
- LIGHT_BLEND_LIGHTEN,
- LIGHT_BLEND_DARKEN,
- LIGHT_BLEND_OVERLAY,
- LIGHT_BLEND_SCREEN,
- };
-
private:
RID canvas_light;
bool enabled;
bool shadow;
Color color;
float height;
+ float _scale;
int z_min;
int z_max;
+ int layer_min;
+ int layer_max;
int item_mask;
- LightBlendMode blend_mode;
+ int item_shadow_mask;
+ int shadow_buffer_size;
+ float shadow_esm_multiplier;
+ bool subtract_mode;
Ref<Texture> texture;
Vector2 texture_offset;
protected:
+ void _notification(int p_what);
static void _bind_methods();
public:
+ virtual void edit_set_pivot(const Point2& p_pivot);
+ virtual Point2 edit_get_pivot() const;
+ virtual bool edit_has_pivot() const;
+
void set_enabled( bool p_enabled);
bool is_enabled() const;
@@ -54,27 +51,44 @@ public:
void set_height( float p_height);
float get_height() const;
+ void set_texture_scale( float p_scale);
+ float get_texture_scale() const;
+
void set_z_range_min( int p_min_z);
int get_z_range_min() const;
void set_z_range_max( int p_max_z);
int get_z_range_max() const;
+ void set_layer_range_min( int p_min_layer);
+ int get_layer_range_min() const;
+
+ void set_layer_range_max( int p_max_layer);
+ int get_layer_range_max() const;
+
void set_item_mask( int p_mask);
int get_item_mask() const;
- void set_blend_mode( LightBlendMode p_blend_mode );
- LightBlendMode get_blend_mode() const;
+ void set_item_shadow_mask( int p_mask);
+ int get_item_shadow_mask() const;
+
+ void set_subtract_mode( bool p_enable );
+ bool get_subtract_mode() const;
void set_shadow_enabled( bool p_enabled);
bool is_shadow_enabled() const;
+ void set_shadow_buffer_size( int p_size );
+ int get_shadow_buffer_size() const;
+
+ void set_shadow_esm_multiplier( float p_multiplier);
+ float get_shadow_esm_multiplier() const;
+
+ virtual Rect2 get_item_rect() const;
Light2D();
~Light2D();
};
-VARIANT_ENUM_CAST(Light2D::LightBlendMode);
-
#endif // LIGHT_2D_H