more fine tuning and removed test code.

This commit is contained in:
Andreas Ortmann 2016-09-30 22:30:50 +02:00
parent 03998dc74a
commit e1102e3231
2 changed files with 9 additions and 12 deletions

View file

@ -26,8 +26,8 @@ void main()
decay = ageMod / halfAge;
// faster particles are smaller
float speedScale = (1.0 - 0.8*length(in_velocity)/maxVelocity);
float finalSize = size * speedScale;
float scaleBySpeed = (1.0 - 0.95*length(in_velocity)/maxVelocity);
float finalSize = size * scaleBySpeed;
vec2 base = in_vertex;
vec3 p = finalSize*vec3(base, 0.0);
vec3 offset = (0.2*age + log(1.0+age*5.0)) * in_velocity + in_position;