[vlc-commits] gl: android: precise rgba sampling with samplerExternalOES
Thomas Guillem
git at videolan.org
Sat Apr 21 14:55:58 CEST 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Apr 21 14:14:56 2018 +0200| [e57241f6fa81855d34bb86e923792a0188cdbc10] | committer: Thomas Guillem
gl: android: precise rgba sampling with samplerExternalOES
This should not be needed but this fixes wrong colors on Sony Xperia XZ2
devices.
PS: The OES_EGL_image_external documentation says:
"Sampling an external texture will return an RGBA vector in the same colorspace
as the source image."
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e57241f6fa81855d34bb86e923792a0188cdbc10
---
modules/video_output/opengl/converter_android.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/video_output/opengl/converter_android.c b/modules/video_output/opengl/converter_android.c
index b028e47a22..6eb21a4633 100644
--- a/modules/video_output/opengl/converter_android.c
+++ b/modules/video_output/opengl/converter_android.c
@@ -261,7 +261,7 @@ Open(vlc_object_t *obj)
"uniform mat4 uSTMatrix;"
"void main()"
"{ "
- " gl_FragColor = texture2D(sTexture, (uSTMatrix * vec4(TexCoord0, 1, 1)).xy);"
+ " gl_FragColor = texture2D(sTexture, (uSTMatrix * vec4(TexCoord0, 1, 1)).xy).rgba;"
"}";
char *code;
More information about the vlc-commits
mailing list