diff --git a/.gitignore b/.gitignore index 1a074fb..c8e4a2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@  - -/grk/project/shaders - /grk/.vs/grk-cw /grk/project/Debug \ No newline at end of file diff --git a/grk/project/shaders/particle.frag b/grk/project/shaders/particle.frag new file mode 100644 index 0000000..e6a053d --- /dev/null +++ b/grk/project/shaders/particle.frag @@ -0,0 +1,8 @@ +#version 330 core +out vec4 FragColor; + +in vec3 vertexColor; + +void main() { + FragColor = vec4(vertexColor.r, vertexColor.g, vertexColor.b, 1.0); +} \ No newline at end of file diff --git a/grk/project/shaders/particle.vert b/grk/project/shaders/particle.vert new file mode 100644 index 0000000..b18b623 --- /dev/null +++ b/grk/project/shaders/particle.vert @@ -0,0 +1,14 @@ +#version 330 core +layout (location = 0) in vec3 inPosition; + +out vec3 vertexColor; + +uniform mat4 model; +uniform mat4 view; +uniform mat4 projection; +uniform vec3 color; + +void main() { + gl_Position = projection * view * model * vec4(inPosition, 1.0); + vertexColor = color; +}