summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools/shaders/triplanaryuvvideo_core.frag
blob: ad81083f5dbe4ae240739ec5776a3bbe516f5c2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#version 150 core
uniform sampler2D plane1Texture;
uniform sampler2D plane2Texture;
uniform sampler2D plane3Texture;
uniform mat4 colorMatrix;
uniform float opacity;
in vec2 plane1TexCoord;
in vec2 plane2TexCoord;
in vec2 plane3TexCoord;
out vec4 fragColor;

void main()
{
    float Y = texture(plane1Texture, plane1TexCoord).r;
    float U = texture(plane2Texture, plane2TexCoord).r;
    float V = texture(plane3Texture, plane3TexCoord).r;
    vec4 color = vec4(Y, U, V, 1.);
    fragColor = colorMatrix * color * opacity;
}