diff options
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/frag.frag | 25 | ||||
-rw-r--r-- | shaders/vert.vert | 22 |
2 files changed, 47 insertions, 0 deletions
diff --git a/shaders/frag.frag b/shaders/frag.frag new file mode 100644 index 0000000..c6bdbde --- /dev/null +++ b/shaders/frag.frag @@ -0,0 +1,25 @@ +#version 300 es + +/* + * Copyright (C) 2021 Philip Jones + * + * Licensed under the MIT License. + * See either the LICENSE file, or: + * + * https://opensource.org/licenses/MIT + * + * I don't think you can really copyright this shader though :) + */ + +precision highp float; + +in vec2 Texcoord; + +out vec4 FragColor; + +uniform sampler2D tex; + +void main() +{ + FragColor = texture(tex, Texcoord); +} diff --git a/shaders/vert.vert b/shaders/vert.vert new file mode 100644 index 0000000..9d62b85 --- /dev/null +++ b/shaders/vert.vert @@ -0,0 +1,22 @@ +#version 300 es + +/* + * Copyright (C) 2017-2020 Philip Jones + * + * Licensed under the MIT License. + * See either the LICENSE file, or: + * + * https://opensource.org/licenses/MIT + * + */ + +in vec2 position; +in vec2 texcoord; + +out vec2 Texcoord; + +void main() +{ + Texcoord = texcoord; + gl_Position = vec4(position, 0.0, 1.0); +} |