diff options
| author | Jules <jules@asdf.us> | 2015-10-10 11:14:58 -0400 |
|---|---|---|
| committer | Jules <jules@asdf.us> | 2015-10-10 11:14:58 -0400 |
| commit | 860a352f3ddac99aeea6b51c47a9951ea20a8363 (patch) | |
| tree | 75b732ad61674ac2b814099800aa99bb6af5ca7c /webcam.html | |
| parent | 763efa0edf27ef1ed2e0a722ff1551d55f0e4f02 (diff) | |
four corners webcam effect
Diffstat (limited to 'webcam.html')
| -rw-r--r-- | webcam.html | 8 |
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) { |
