Use ESSL 1.0 for EGLRenderer shaders

We still ostensibly support GLES 2.0 GPUs.
This commit is contained in:
Cameron Gutman
2025-12-27 22:56:20 -06:00
parent 249c29b74c
commit d1f43ca258
8 changed files with 15 additions and 40 deletions
@@ -5,4 +5,4 @@ varying vec2 vTexCoord;
void main() {
vTexCoord = aTexCoord;
gl_Position = vec4(aPosition, 0, 1);
}
}
+7 -9
View File
@@ -1,9 +1,7 @@
#version 300 es
#extension GL_OES_EGL_image_external : require
precision mediump float;
out vec4 FragColor;
in vec2 vTextCoord;
varying vec2 vTexCoord;
uniform mat3 yuvmat;
uniform vec3 offset;
@@ -12,11 +10,11 @@ uniform samplerExternalOES plane1;
uniform samplerExternalOES plane2;
void main() {
vec3 YCbCr = vec3(
texture2D(plane1, vTextCoord)[0],
texture2D(plane2, vTextCoord + chromaOffset).xy
);
vec3 YCbCr = vec3(
texture2D(plane1, vTexCoord)[0],
texture2D(plane2, vTexCoord + chromaOffset).xy
);
YCbCr -= offset;
FragColor = vec4(clamp(yuvmat * YCbCr, 0.0, 1.0), 1.0f);
YCbCr -= offset;
gl_FragColor = vec4(clamp(yuvmat * YCbCr, 0.0, 1.0), 1.0f);
}
-10
View File
@@ -1,10 +0,0 @@
#version 300 es
layout (location = 0) in vec2 aPosition; // 2D: X,Y
layout (location = 1) in vec2 aTexCoord;
out vec2 vTextCoord;
void main() {
vTextCoord = aTexCoord;
gl_Position = vec4(aPosition, 0, 1);
}
+2 -4
View File
@@ -1,12 +1,10 @@
#version 300 es
#extension GL_OES_EGL_image_external : require
precision mediump float;
out vec4 FragColor;
in vec2 vTextCoord;
varying vec2 vTexCoord;
uniform samplerExternalOES uTexture;
void main() {
FragColor = texture2D(uTexture, vTextCoord);
gl_FragColor = texture2D(uTexture, vTexCoord);
}
-10
View File
@@ -1,10 +0,0 @@
#version 300 es
layout (location = 0) in vec2 aPosition; // 2D: X,Y
layout (location = 1) in vec2 aTexCoord;
out vec2 vTextCoord;
void main() {
vTextCoord = aTexCoord;
gl_Position = vec4(aPosition, 0, 1);
}
+1
View File
@@ -1,4 +1,5 @@
precision mediump float;
uniform sampler2D uTexture;
varying vec2 vTexCoord;