71 pivot = math::vec2(0.5f, 0.5f);
162 if(temporal_count < temporal_buffer_size)
166 float total_distance = 0.0f;
167 float total_time = 0.0f;
168 for(uint32_t i = 1; i < temporal_count; ++i)
170 const math::vec3 delta = temporal_positions[i] - temporal_positions[i - 1];
171 total_distance += math::length(delta);
172 total_time += temporal_dts[i];
174 if(total_time > 0.0f)
176 return total_distance / total_time;
auto add_point(const T &element, float progress) -> size_t
void generate_lut(size_t lut_size=256)
blend_mode
Blend mode. Ordinals match legacy BlendMode.
texture_mode
Texture interpretation. Ordinals match legacy TextureMode.
spawn_location
Where particles spawn within the shape. Ordinals match legacy EmitterSpawnLocation.
emitter_feature
Feature bits baked from authoring desc for specialized update/render paths.
@ lifetime_by_emitter_speed
render_mode
Billboard / facing mode. Ordinals match legacy RenderMode.
Storage for box vector values and wraps up common functionality.
math::gradient< math::color > color_by_speed_gradient
frange_t size_by_speed_range
math::gradient< math::color > color_gradient
math::gradient< frange_t > scale_gradient
frange_t size_by_speed_velocity_range
frange_t color_by_speed_velocity_range
math::vec3 initial_scale_3d
emitter_appearance_desc appearance
emitter_emission_desc emission
emitter_render_desc render
auto bake_features() const -> emitter_feature
Derive feature mask used to specialize update/render kernels.
emitter_motion_desc motion
emitter_playback_desc playback
float particles_per_second
math::vec3 shape_position
bx::Easing::Enum position_easing
math::gradient< frange_t > velocity_gradient
math::gradient< float > lifetime_by_emitter_speed_gradient
math::vec3 force_over_lifetime
frange_t lifetime_by_emitter_speed_range
math::vec2 tex_sheet_tiles
std::array< float, temporal_buffer_size > temporal_dts
uint32_t total_particles_spawned
std::array< math::vec3, temporal_buffer_size > temporal_positions
auto calculate_smoothed_emitter_speed(float max_speed) const -> float
static constexpr size_t temporal_buffer_size
void push_temporal_sample(const math::vec3 &position, float dt)
float start_delay_elapsed
float emission_time_accum