Jump to content
  • Advertisement
Sign in to follow this  
carmellose

OpenGL Depth of Field

This topic is 3683 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys here i am again! ... :/ I'd like to try implementing a DOF effect in openGL (following this definition http://en.wikipedia.org/wiki/Depth_of_field). In the openGL framework, I've seen the DOF effect should have something to do with the accumulation buffer ... but i really don't know where to start looking. Also, does the DOF effects costs a lot of processing ? is there a way to implement this with a shader (even with CGFX) or is that not appropriate at all ? thanks in advance, and sorry for my broken english cheers

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by carmellose
is there a way to implement this with a shader (even with CGFX) or is that not appropriate at all ?
DOF is almost always implemented with shaders (as are most other effects these days). As an extreme simplification: render the scene to a texture, and then blur that texture based on the depth buffer as you render it to the screen.

Share this post


Link to post
Share on other sites
hello,

thank you for your answmer. Ok, i'll try to do it with a shader then ;)
However, i think i might be able to implement a blur effect, but what about the DOF ? could you elaborate on how to proceed and/or the "algorithm" to use? Are there any reference to look at?

thanks!

cheers

Share this post


Link to post
Share on other sites
Just give google a try: http://www.google.com/search?hl=de&rls=com.microsoft%3Ade%3AIE-SearchBox&rlz=1I7ADBR&q=depth+of+field+opengl+filetype%3Apdf&lr= :)
http://ati.amd.com/developer/gdc/Scheuermann_DepthOfField.pdf

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!