GPUParticles: Use smoothstep for fade out and remove direction modulation by size.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14944 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
6808a9df1a
commit
7a95d46448
@ -21,5 +21,5 @@ void main(void)
|
||||
float len = dot(vec3(1.0), abs(texture2D(normals_and_depth, xy).xyz));
|
||||
float alpha = (len < 0.2) ? 1. : clamp((EnvPos.z - FragmentPos.z) * 0.3, 0., 1.);
|
||||
color = texture2D(texture, tc);
|
||||
color.a *= alpha * (1. - lf);
|
||||
color.a *= alpha * smoothstep(1., 0.8, lf);
|
||||
}
|
||||
|
@ -116,9 +116,9 @@ void generateLifetimeSizeDirection(scene::IParticleEmitter *emitter, float &life
|
||||
particledir.rotateYZBy(os::Randomizer::frand() * emitter->getMaxAngleDegrees());
|
||||
particledir.rotateXZBy(os::Randomizer::frand() * emitter->getMaxAngleDegrees());
|
||||
|
||||
dirX = particledir.X / size;
|
||||
dirY = particledir.Y / size;
|
||||
dirZ = particledir.Z / size;
|
||||
dirX = particledir.X;
|
||||
dirY = particledir.Y;
|
||||
dirZ = particledir.Z;
|
||||
}
|
||||
|
||||
struct ParticleData
|
||||
|
Loading…
Reference in New Issue
Block a user