Implement overlay support in EGLRenderer

Fixes #405
This commit is contained in:
Cameron Gutman
2020-12-16 22:09:00 -06:00
parent cd5b0e74e3
commit e5bcc793e5
5 changed files with 239 additions and 46 deletions
+11
View File
@@ -0,0 +1,11 @@
precision mediump float;
uniform sampler2D uTexture;
varying vec2 vTexCoord;
void main() {
vec4 abgr = texture2D(uTexture, vTexCoord);
gl_FragColor = abgr;
gl_FragColor.r = abgr.b;
gl_FragColor.b = abgr.r;
}
+8
View File
@@ -0,0 +1,8 @@
attribute vec2 aPosition; // 2D: X,Y
attribute vec2 aTexCoord;
varying vec2 vTexCoord;
void main() {
vTexCoord = aTexCoord;
gl_Position = vec4(aPosition, 0, 1);
}