yuv2rgb.vs 352 Bytes
Newer Older
1
attribute vec2 position;
2
attribute vec2 uv;
3 4
uniform mat4 proj_matrix;
uniform float rotation;
5 6 7 8
varying vec2 uvVarying;

void main()
{
9 10
    mat3 rot = mat3(vec3(cos(rotation), sin(rotation),0.0), vec3(-sin(rotation), cos(rotation), 0.0), vec3(0.0, 0.0, 1.0));
    gl_Position = proj_matrix * vec4(rot * vec3(position.xy, 0.0), 1.0);
11 12
    uvVarying = uv;
}