summaryrefslogtreecommitdiff
path: root/webcam.html
diff options
context:
space:
mode:
Diffstat (limited to 'webcam.html')
-rw-r--r--webcam.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/webcam.html b/webcam.html
index bbdeda2..fb010a9 100644
--- a/webcam.html
+++ b/webcam.html
@@ -149,6 +149,14 @@ var SHADERS = [
rgbpixel(d, p, x, y < h/2 ? y : h-y-1, w, h)
}
},
+ { name: "four-corners",
+ shader: function(d, p, x, y, w, h){
+ rgbpixel(d, p,
+ Math.round(Math.abs(w*(2*(x/w-0.5)))),
+ Math.round(Math.abs(h*(2*((y+0.5)/h-0.5)))),
+ w, h)
+ }
+ },
]
function rgbpixel(d, p, x, y, w, h) {