diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-06-08 15:52:42 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-06-08 15:52:42 -0400 |
commit | cd6a40d81679c37795e9d24354a8bbbf84cd53a6 (patch) | |
tree | 82186fb0985a16ed76928b0226ff2eed9bb2c261 /render/gles3/shaders.c | |
parent | 83f8864f0ab1722aae12cc744094a7424c41f2d8 (diff) |
Further improvements to rendering subsystem
Diffstat (limited to 'render/gles3/shaders.c')
-rw-r--r-- | render/gles3/shaders.c | 28 |
1 files changed, 28 insertions, 0 deletions
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 <GLES3/gl3.h> + +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"; |