19 lines
450 B
GLSL
19 lines
450 B
GLSL
#version 330 core
|
|
// Dynamic ribbon trail vertex shader. Timestamp is used by the fragment shader
|
|
// to fade recent path segments from red toward brown as they age.
|
|
layout (location = 0) in vec3 aPos;
|
|
layout (location = 1) in float aTimestamp;
|
|
|
|
out float TrailTimestamp;
|
|
|
|
uniform mat4 model;
|
|
uniform mat4 view;
|
|
uniform mat4 projection;
|
|
|
|
void main()
|
|
{
|
|
TrailTimestamp = aTimestamp;
|
|
|
|
gl_Position = projection * view * model * vec4(aPos, 1.0);
|
|
}
|