From b3893d158738117a342926c23f180fe353b25ed7 Mon Sep 17 00:00:00 2001 From: Pawel Felcyn Date: Fri, 2 Feb 2024 21:31:27 +0100 Subject: [PATCH] fix gitignore --- .gitignore | 3 --- grk/project/shaders/particle.frag | 8 ++++++++ grk/project/shaders/particle.vert | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 grk/project/shaders/particle.frag create mode 100644 grk/project/shaders/particle.vert 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; +} -- 2.20.1