From: Andy Belle-Isle Date: Sun, 1 Sep 2019 03:33:25 +0000 (-0400) Subject: Added basic shader files X-Git-Tag: v0.1-alpha~9 X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=0f0400ab9e85a439bce2e913400d55a160d1bd7b;p=clyne%2Fgamedev2.git Added basic shader files --- 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); +}