From 0f0400ab9e85a439bce2e913400d55a160d1bd7b Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Sat, 31 Aug 2019 23:33:25 -0400 Subject: Added basic shader files --- Shaders/world.frag | 17 +++++++++++++++++ Shaders/world.vert | 15 +++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Shaders/world.frag create mode 100644 Shaders/world.vert diff --git a/Shaders/world.frag b/Shaders/world.frag new file mode 100644 index 0000000..c23c923 --- /dev/null +++ b/Shaders/world.frag @@ -0,0 +1,17 @@ +#version 430 + +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif + +//uniform sampler2D texture; + +//in vec3 texCoord; +out vec4 FragColor; + +void main() +{ + FragColor = vec4(1.0, 0.0, 0.0, 1.0); +} diff --git a/Shaders/world.vert b/Shaders/world.vert new file mode 100644 index 0000000..795997a --- /dev/null +++ b/Shaders/world.vert @@ -0,0 +1,15 @@ +#version 430 + +//layout(location = 0)in vec3 vertex; +in vec3 vertex; + +uniform mat4 projection; +uniform mat4 view; +uniform mat4 model; + +//out vec3 texCoord; + +void main() +{ + gl_Position = projection * view * model * vec4(vertex, 1.0f); +} -- cgit v1.2.3