1
0
Fork 0
forked from wry/wry

render: split module into gfx_apis and renderer

This commit is contained in:
Julian Orth 2023-10-22 17:35:31 +02:00
parent 5e8a6eb86f
commit d650b3375d
68 changed files with 219 additions and 222 deletions

View file

@ -0,0 +1,6 @@
precision mediump float;
uniform vec4 color;
void main() {
gl_FragColor = color;
}

View file

@ -0,0 +1,5 @@
attribute vec2 pos;
void main() {
gl_Position = vec4(pos, 0.0, 1.0);
}

View file

@ -0,0 +1,7 @@
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
gl_FragColor = texture2D(tex, v_texcoord);
}

View file

@ -0,0 +1,9 @@
#extension GL_OES_EGL_image_external : require
precision mediump float;
varying vec2 v_texcoord;
uniform samplerExternalOES tex;
void main() {
gl_FragColor = texture2D(tex, v_texcoord);
}

View file

@ -0,0 +1,9 @@
#extension GL_OES_EGL_image_external : require
precision mediump float;
varying vec2 v_texcoord;
uniform samplerExternalOES tex;
void main() {
gl_FragColor = vec4(texture2D(tex, v_texcoord).rgb, 1.0);
}

View file

@ -0,0 +1,7 @@
precision mediump float;
varying vec2 v_texcoord;
uniform sampler2D tex;
void main() {
gl_FragColor = vec4(texture2D(tex, v_texcoord).rgb, 1.0);
}

View file

@ -0,0 +1,8 @@
attribute vec2 pos;
attribute vec2 texcoord;
varying vec2 v_texcoord;
void main() {
gl_Position = vec4(pos, 0.0, 1.0);
v_texcoord = texcoord;
}