X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=colorspace_conversion_effect.frag;fp=colorspace_conversion_effect.frag;h=ea858fb37885b6e979f180c2a7665143327ce743;hp=0000000000000000000000000000000000000000;hb=d4542f76df5d26843c68b1467e76722cffd801a1;hpb=873b60b640a96c8fb4c2d8c88c85d20e0a2dca6b diff --git a/colorspace_conversion_effect.frag b/colorspace_conversion_effect.frag new file mode 100644 index 0000000..ea858fb --- /dev/null +++ b/colorspace_conversion_effect.frag @@ -0,0 +1,8 @@ +// Colorspace conversion (needs to be done in linear space). +// The matrix is computed on the host and baked into the shader at compile time. + +vec4 FUNCNAME(vec2 tc) { + vec4 x = LAST_INPUT(tc); + x.rgb = PREFIX(conversion_matrix) * x.rgb; + return x; +}