diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-09-08 03:00:24 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-09-08 03:00:24 +0200 |
commit | 1ca79e8645f9f3cf471c32cf9fd2894a4b41bcb1 (patch) | |
tree | b35436ae81924383c43f03f0fc00e6a72ebe6cb3 /src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag | |
parent | 871a097d0c6e8203f82b398e21dcfd8151bdae27 (diff) | |
parent | c5400d31a40847e2905b11759090400653624a94 (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12v5.12.0-alpha1
Change-Id: I886c4bda70a2b5a013a445d03487c7e3ef98e858
Diffstat (limited to 'src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag')
-rw-r--r-- | src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag new file mode 100644 index 000000000..48ef3fa2c --- /dev/null +++ b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag @@ -0,0 +1,16 @@ +#version 150 core +uniform sampler2D plane1Texture; +uniform sampler2D plane2Texture; +uniform mat4 colorMatrix; +uniform float opacity; +in vec2 plane1TexCoord; +in vec2 plane2TexCoord; +out vec4 fragColor; + +void main() +{ + float Y = texture(plane1Texture, plane1TexCoord).r; + vec2 UV = texture(plane2Texture, plane2TexCoord).ar; + vec4 color = vec4(Y, UV.x, UV.y, 1.); + fragColor = colorMatrix * color * opacity; +} |