mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 02:19:13 +01:00
Let the smoke leave the exhaust as a widening jet that fades in
This commit is contained in:
@@ -246,10 +246,10 @@ void opengl46_gpu_particles::simulate_smoke(particle_manager &Particles, glm::dv
|
||||
record.previous = glm::vec4{glm::vec3{state.previous - m_origin}, 0.f};
|
||||
record.launch = glm::vec4{state.inclination[0], state.inclination[1], state.velocity[0], state.velocity[1]};
|
||||
record.initial = glm::vec4{state.size[0], state.size[1], state.opacity[0], state.opacity[1]};
|
||||
record.sizechange = glm::vec4{state.sizechange[0], state.sizechange[1], state.sizechange[2], 0.f};
|
||||
record.sizechange = glm::vec4{state.sizechange[0], state.sizechange[1], state.sizechange[2], state.spread};
|
||||
record.opacitychange = glm::vec4{state.opacitychange[0], state.opacitychange[1], state.opacitychange[2], 0.f};
|
||||
record.motion = glm::vec4{state.rise, state.damping, state.risemin, 0.f};
|
||||
record.settling = glm::vec4{state.settling, state.drag, state.settles ? 1.f : 0.f, 0.f};
|
||||
record.settling = glm::vec4{state.settling, state.drag, state.settles ? 1.f : 0.f, state.fadein};
|
||||
record.color = glm::vec4{glm::clamp(state.color, glm::vec3{0.f}, glm::vec3{1.f}), 0.f};
|
||||
record.oldcolor = glm::vec4{glm::clamp(state.color * oldlight, glm::vec3{0.f}, glm::vec3{1.f}), 0.f};
|
||||
if (pool.size > 0)
|
||||
|
||||
@@ -67,7 +67,7 @@ opengl46_particles::update( opengl_camera const &Camera ) {
|
||||
vertex.color[ 0 ] = particlecolor.r;
|
||||
vertex.color[ 1 ] = particlecolor.g;
|
||||
vertex.color[ 2 ] = particlecolor.b;
|
||||
vertex.color.a = std::clamp(particle.opacity, 0.0f, 1.0f);
|
||||
vertex.color.a = std::clamp(particle.opacity, 0.0f, 1.0f) * sourcedata.fade_in(particle.age);
|
||||
|
||||
auto const offset { glm::vec3{ particle.position - Camera.position() } };
|
||||
auto const rotation { glm::angleAxis( particle.rotation, glm::vec3{ 0.f, 0.f, 1.f } ) };
|
||||
|
||||
Reference in New Issue
Block a user