3 ms·
It might be helpful to separate the code that creates the parallax effect from the angular app that displays the website & examples. This is a really cool tric
by arscan 12y ago
It might be helpful to separate the code that creates the parallax effect from the angular app that displays the website & examples. This is a really cool trick and it would be nice to be able to easily reuse it. For those looking, it seems like the "magic" happens in a couple of spots (I think):
https://github.com/panrafal/depthy/blob/master/app/scripts/pixi/DepthFilter.js https://github.com/panrafal/depthy/blob/master/app/scripts/p...
and in
https://github.com/panrafal/depthy/blob/master/app/scripts/controllers/viewer.js https://github.com/panrafal/depthy/blob/master/app/scripts/c...
- panrafal 12y agoThere already is a library for extracting the depth map here: https://github.com/spite/android-lens-blur-depth-extractor https://github.com/spite/android-lens-blur-depth-extractor (internet rocks, isn't it ;) ) As for the Shader - it's just a few lines of actual code. Depthy is a quick weekend hack. There's a loong way before it.
- aantix 12y agoHas anyone managed to replicate the lens blur effect that's being utilized in the new Android camera app? Or at least know what research paper it's based on?
- panrafal 12y agoYes, here: http://jabtunes.com/labs/lensblur/index3.html http://jabtunes.com/labs/lensblur/index3.html and here: http://quasimondo.com/QuasimondoLibsJS/demos/DepthMapLensBlur.html http://quasimondo.com/QuasimondoLibsJS/demos/DepthMapLensBlu...
- comex 12y agoThat seems to just be using the depth map information stored by the app, not replicating the effect from scratch.