]> git.sesse.net Git - movit/blobdiff - colorspace_conversion_effect.frag
Rename .glsl to .vert/.frag.
[movit] / colorspace_conversion_effect.frag
diff --git a/colorspace_conversion_effect.frag b/colorspace_conversion_effect.frag
new file mode 100644 (file)
index 0000000..ea858fb
--- /dev/null
@@ -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;
+}