Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/p...

and in

https://github.com/panrafal/depthy/blob/master/app/scripts/c...




There already is a library for extracting the depth map here: 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.


Has 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?



That seems to just be using the depth map information stored by the app, not replicating the effect from scratch.


They recalculate the blur. Were you asking about calculating the depthmap?


Yes, I was wondering how to fully replicate the effect without the need for the app.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: