Enhancements to breadcrumb trail
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#version 460 core
|
||||
// Simple vertex shader for the player's breadcrumb trail triangles.
|
||||
#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 vec3 FragPos;
|
||||
out float TrailTimestamp;
|
||||
|
||||
uniform mat4 model;
|
||||
uniform mat4 view;
|
||||
@@ -10,7 +12,7 @@ uniform mat4 projection;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragPos = vec3(model * vec4(aPos, 1.0));
|
||||
TrailTimestamp = aTimestamp;
|
||||
|
||||
gl_Position = projection * view * vec4(FragPos, 1.0);
|
||||
gl_Position = projection * view * model * vec4(aPos, 1.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user