16 lines
No EOL
401 B
GLSL
16 lines
No EOL
401 B
GLSL
#version 120
|
|
varying vec2 vertex;
|
|
varying vec2 velocity;
|
|
uniform float maxAge;
|
|
uniform float time;
|
|
void main()
|
|
{
|
|
//gl_FragColor = vec4(0.5+0.5*vertex.x, 0.5+0.5*vertex.y, 0.0, 1.0);
|
|
if (length(vertex) > 1.0) {
|
|
discard;
|
|
}
|
|
float decay = time / maxAge;
|
|
decay = 5.0*decay*decay;
|
|
// (length(10.0*velocity));
|
|
gl_FragColor = vec4(1.0/max(1.0, decay), 1.0/max(1.0, 6.0*decay), 0.0, 1.0);
|
|
} |