Enhancements to breadcrumb trail

This commit is contained in:
2026-05-19 17:36:42 -04:00
parent 7235d756dc
commit 186d9f673a
16 changed files with 514 additions and 117 deletions

View File

@@ -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);
}