module
CrShader::Language::Builtins::Particles
Overview
Built-in variables available in Particle shaders (shader_type :particles).
Defined in:
crshader/language/builtins.crConstant Summary
-
ACTIVE =
true -
True if the particle is currently active and alive in the simulation.
-
COLOR =
Types::Vec4.new -
Tint color of the particle.
-
CUSTOM =
Types::Vec4.new -
4-component custom user attribute vector associated with the particle.
-
DELTA =
0.016666_f32 -
Frame delta time step in seconds.
-
INDEX =
0_u32 -
Unique zero-based integer index of this particle instance.
-
LIFETIME =
1.0_f32 -
Total lifetime duration of the particle in seconds.
-
MASS =
1.0_f32 -
Particle mass multiplier for physics and forces.
-
NUMBER =
100_u32 -
Total count of particles in the emitter.
-
RESTART =
false -
True on the first simulation frame when a particle is spawned or restarted.
-
SEED =
0_u32 -
Deterministic pseudo-random seed assigned to this particle.
-
TRANSFORM =
Types::Mat4.new(Types::Vec4.new, Types::Vec4.new, Types::Vec4.new, Types::Vec4.new) -
4x4 transform matrix representing position, rotation, and scale of the particle.
-
VELOCITY =
Types::Vec3.new -
Linear velocity vector of the particle in units per second.