Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

For the iOS app I am writing I want to incorporate some aspects of ambient occlusion for photo manipulation. Can someone suggest a GLSL approach that will work. Realtime performance is not super critical. Under a second compute time is fine.

share|improve this question
    
Just googled Ambient Occlusion, this seems pretty detailed: http.developer.nvidia.com/GPUGems2/gpugems2_chapter14.html –  ashes999 Apr 23 '12 at 13:34
    
Whoa. Sweet. Thanks for this ashes999. –  dugla Apr 23 '12 at 14:14
    
No worries, hope it helps. I don't know about your specific problem, but that sure helped me understand what you're asking :) –  ashes999 Apr 23 '12 at 14:45
add comment

1 Answer

up vote 2 down vote accepted

Generally, ambient occlusion requires 3D data to be calculated. If you are planning to add some depth information then I would suggest the use of screen space ambient occlusion; SSAO.

Using screen space ambient occlusion should fit better into your pipeline. Since you want to manipulate photos, I presume you already have a method for adding post process filters.

What you will need to do is render the 3D data to a depth buffer. There are many sources which detail how to do this. If you can't find any, try looking up deferred shading techniques. These rely on filling a depth buffer for post processing so there should be a good example out there for you.

share|improve this answer
    
One of the approaches I have in mind is to break a photo into pieces - squares, dots, shards - displace them in z and then do an AO bake and shade. Also, tearing a photo into pieces then overlaying multiple instances of the same photo then AO bake and render. I need AO to help "sell" the overlay and sence of depth. Cheers. –  dugla Apr 23 '12 at 14:10
    
In my system an iPad/iPhone photo is converted to a texture-mapped quad so everything is 3D. I use a 3D viewing frustrum to enable z-depth. –  dugla Apr 23 '12 at 17:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.