Add trail to show where we've been
This commit is contained in:
11
trailfragshader.txt
Normal file
11
trailfragshader.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
#version 460 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec3 FragPos;
|
||||
|
||||
uniform vec3 objectcolor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(objectcolor, 1.0);
|
||||
}
|
||||
15
trailshader.txt
Normal file
15
trailshader.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
#version 460 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
|
||||
out vec3 FragPos;
|
||||
|
||||
uniform mat4 model;
|
||||
uniform mat4 view;
|
||||
uniform mat4 projection;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragPos = vec3(model * vec4(aPos, 1.0));
|
||||
|
||||
gl_Position = projection * view * vec4(FragPos, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user