mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-04 01:52:05 +01:00
Let the smoke leave the exhaust as a widening jet that fades in
This commit is contained in:
@@ -48,5 +48,9 @@ void main()
|
||||
vec3 color = source.oldcolor.rgb;
|
||||
if (options.x > 0.5)
|
||||
color = source.color.rgb * particle_light((view * vec4(world, 1.0)).xyz, world, options.y);
|
||||
particle_emit(world, size, vec3(particle.position.w, 0.0, 0.0), color, clamp(particle.state.x, 0.0, 1.0), uint(options.z));
|
||||
float opacity = clamp(particle.state.x, 0.0, 1.0);
|
||||
// showing up after the birth (smoke_source::fade_in())
|
||||
if (source.settling.w > 0.0)
|
||||
opacity *= smoothstep(0.0, source.settling.w, particle.state.y);
|
||||
particle_emit(world, size, vec3(particle.position.w, 0.0, 0.0), color, opacity, uint(options.z));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user