wayland: implement alpha_modifier_v1
This commit is contained in:
parent
131f0481e8
commit
ff54a8ab96
37 changed files with 655 additions and 89 deletions
|
|
@ -1,7 +0,0 @@
|
|||
precision mediump float;
|
||||
varying vec2 v_texcoord;
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main() {
|
||||
gl_FragColor = texture2D(tex, v_texcoord);
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#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);
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#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);
|
||||
}
|
||||
|
|
@ -1,7 +1,34 @@
|
|||
#ifdef EXTERNAL
|
||||
#extension GL_OES_EGL_image_external : require
|
||||
#endif
|
||||
|
||||
precision mediump float;
|
||||
varying vec2 v_texcoord;
|
||||
#ifdef EXTERNAL
|
||||
uniform samplerExternalOES tex;
|
||||
#else
|
||||
uniform sampler2D tex;
|
||||
#endif
|
||||
#ifdef ALPHA_MULTIPLIER
|
||||
uniform float alpha;
|
||||
#endif
|
||||
|
||||
void main() {
|
||||
#ifdef ALPHA
|
||||
|
||||
#ifdef ALPHA_MULTIPLIER
|
||||
gl_FragColor = texture2D(tex, v_texcoord) * alpha;
|
||||
#else // !ALPHA_MULTIPLIER
|
||||
gl_FragColor = texture2D(tex, v_texcoord);
|
||||
#endif // ALPHA_MULTIPLIER
|
||||
|
||||
#else // !ALPHA
|
||||
|
||||
#ifdef ALPHA_MULTIPLIER
|
||||
gl_FragColor = vec4(texture2D(tex, v_texcoord).rgb * alpha, alpha);
|
||||
#else // !ALPHA_MULTIPLIER
|
||||
gl_FragColor = vec4(texture2D(tex, v_texcoord).rgb, 1.0);
|
||||
#endif // ALPHA_MULTIPLIER
|
||||
|
||||
#endif // ALPHA
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue