]> git.sesse.net Git - movit/blobdiff - blur_effect.frag
Support multiple render phases (with FBOs and all), and make a sample blur effect...
[movit] / blur_effect.frag
diff --git a/blur_effect.frag b/blur_effect.frag
new file mode 100644 (file)
index 0000000..bfa1d16
--- /dev/null
@@ -0,0 +1,17 @@
+// A simple, very stupid horizontal blur. Will be fixed soonish.
+
+vec4 FUNCNAME(vec2 tc) {
+       vec4 x = LAST_INPUT(tc);
+       return
+               vec4(0.1) * LAST_INPUT(tc + vec2(-0.010f, 0.0)) +
+               vec4(0.1) * LAST_INPUT(tc + vec2(-0.008f, 0.0)) +
+               vec4(0.1) * LAST_INPUT(tc + vec2(-0.006f, 0.0)) +
+               vec4(0.1) * LAST_INPUT(tc + vec2(-0.004f, 0.0)) +
+               vec4(0.2) * LAST_INPUT(tc + vec2(-0.002f, 0.0)) +
+               vec4(0.3) * LAST_INPUT(tc + vec2(-0.000f, 0.0)) +
+               vec4(0.2) * LAST_INPUT(tc + vec2( 0.002f, 0.0)) +
+               vec4(0.1) * LAST_INPUT(tc + vec2( 0.004f, 0.0)) +
+               vec4(0.1) * LAST_INPUT(tc + vec2( 0.006f, 0.0)) +
+               vec4(0.1) * LAST_INPUT(tc + vec2( 0.008f, 0.0)) +
+               vec4(0.1) * LAST_INPUT(tc + vec2( 0.010f, 0.0));
+}