summaryrefslogtreecommitdiffstats
path: root/scene/3d/particles.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/particles.h')
-rw-r--r--scene/3d/particles.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/scene/3d/particles.h b/scene/3d/particles.h
index 63ebd7ed7b..dad8ed4585 100644
--- a/scene/3d/particles.h
+++ b/scene/3d/particles.h
@@ -154,6 +154,8 @@ public:
enum Flags {
FLAG_ALIGN_Y_TO_VELOCITY,
FLAG_ROTATE_Y,
+ FLAG_DISABLE_Z,
+ FLAG_ANIM_LOOP,
FLAG_MAX
};
@@ -171,11 +173,12 @@ private:
struct {
uint32_t texture_mask : 16;
uint32_t texture_color : 1;
- uint32_t flags : 2;
+ uint32_t flags : 4;
uint32_t emission_shape : 2;
uint32_t trail_size_texture : 1;
uint32_t trail_color_texture : 1;
uint32_t invalid_key : 1;
+ uint32_t has_emission_color : 1;
};
uint32_t key;
@@ -213,6 +216,7 @@ private:
mk.emission_shape = emission_shape;
mk.trail_color_texture = trail_color_modifier.is_valid() ? 1 : 0;
mk.trail_size_texture = trail_size_modifier.is_valid() ? 1 : 0;
+ mk.has_emission_color = emission_shape >= EMISSION_SHAPE_POINTS && emission_color_texture.is_valid();
return mk;
}
@@ -269,6 +273,7 @@ private:
StringName emission_texture_point_count;
StringName emission_texture_points;
StringName emission_texture_normal;
+ StringName emission_texture_color;
StringName trail_divisor;
StringName trail_size_modifier;
@@ -302,8 +307,11 @@ private:
Vector3 emission_box_extents;
Ref<Texture> emission_point_texture;
Ref<Texture> emission_normal_texture;
+ Ref<Texture> emission_color_texture;
int emission_point_count;
+ bool anim_loop;
+
int trail_divisor;
Ref<CurveTexture> trail_size_modifier;
@@ -347,6 +355,7 @@ public:
void set_emission_box_extents(Vector3 p_extents);
void set_emission_point_texture(const Ref<Texture> &p_points);
void set_emission_normal_texture(const Ref<Texture> &p_normals);
+ void set_emission_color_texture(const Ref<Texture> &p_colors);
void set_emission_point_count(int p_count);
EmissionShape get_emission_shape() const;
@@ -354,6 +363,7 @@ public:
Vector3 get_emission_box_extents() const;
Ref<Texture> get_emission_point_texture() const;
Ref<Texture> get_emission_normal_texture() const;
+ Ref<Texture> get_emission_color_texture() const;
int get_emission_point_count() const;
void set_trail_divisor(int p_divisor);