From 42679f7e53364e8de8de665ac7ba9b7e2dd1970b Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Tue, 26 Oct 2021 23:15:46 +0100 Subject: Add PNG background. --- shaders/frag.frag | 25 +++++++++++++++++++++++++ shaders/vert.vert | 22 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 shaders/frag.frag create mode 100644 shaders/vert.vert (limited to 'shaders') 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); +} -- cgit v1.2.3