]> git.sesse.net Git - movit/blob - colorspace_conversion_effect.frag
Implement GammaExpansionEffect using ALU ops instead of texture lookups.
[movit] / colorspace_conversion_effect.frag
1 // Colorspace conversion (needs to be done in linear space).
2 // The matrix is computed on the host and baked into the shader at compile time.
3
4 vec4 FUNCNAME(vec2 tc) {
5         vec4 x = INPUT(tc);
6         x.rgb = PREFIX(conversion_matrix) * x.rgb;
7         return x;
8 }