From dee50239be8fff566b3ca687bc70900b391a8164 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Wed, 16 Aug 2017 20:11:07 +0500 Subject: 2017-08-16 --- cwd/shaders/entity.fs | 9 +++++++++ cwd/shaders/entity.vs | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 cwd/shaders/entity.fs create mode 100644 cwd/shaders/entity.vs (limited to 'cwd') diff --git a/cwd/shaders/entity.fs b/cwd/shaders/entity.fs new file mode 100644 index 0000000..6935d1b --- /dev/null +++ b/cwd/shaders/entity.fs @@ -0,0 +1,9 @@ +#version 330 core + +uniform vec3 color; +in vec2 uvPos; + +void main(){ + if (uvPos.x < 0.9 && uvPos.x > 0.1 && uvPos.y < 0.9 && uvPos.y > 0.1) discard; + gl_FragColor = vec4(color,1); +} \ No newline at end of file diff --git a/cwd/shaders/entity.vs b/cwd/shaders/entity.vs new file mode 100644 index 0000000..baa25e5 --- /dev/null +++ b/cwd/shaders/entity.vs @@ -0,0 +1,13 @@ +#version 330 core + +uniform mat4 view; +uniform mat4 projection; +uniform mat4 model; +layout (location = 0) in vec3 position; +layout (location = 1) in vec2 uvPosition; +out vec2 uvPos; + +void main(){ + uvPos = uvPosition; + gl_Position = projection*view*model*vec4(position,1); +} \ No newline at end of file -- cgit v1.2.3