From cd6a40d81679c37795e9d24354a8bbbf84cd53a6 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 8 Jun 2017 15:52:42 -0400 Subject: Further improvements to rendering subsystem --- render/gles3/shaders.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 render/gles3/shaders.c (limited to 'render/gles3/shaders.c') diff --git a/render/gles3/shaders.c b/render/gles3/shaders.c new file mode 100644 index 00000000..f53ef385 --- /dev/null +++ b/render/gles3/shaders.c @@ -0,0 +1,28 @@ +#include "render/gles3.h" +#include + +const GLchar vertex_src[] = +"uniform mat4 proj;\n" +"attribute vec2 pos;\n" +"attribute vec2 texcoord;\n" +"varying vec2 v_texcoord;\n" +"void main() {\n" +" gl_Position = proj * vec4(pos, 0.0, 1.0);\n" +" v_texcoord = texcoord;\n" +"}\n"; + +const GLchar fragment_src_RGB[] = +"precision mediump float;\n" +"varying vec2 v_texcoord;\n" +"uniform sampler2D tex;\n" +"void main() {\n" +" gl_FragColor = vec4(texture2D(tex, v_texcoord).rgb, 1.0);\n" +"}\n"; + +const GLchar fragment_src_RGBA[] = +"precision mediump float;\n" +"varying vec2 v_texcoord;\n" +"uniform sampler2D tex;\n" +"void main() {\n" +" gl_FragColor = texture2D(tex, v_texcoord);\n" +"}\n"; -- cgit v1.2.3