Depth of Field
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
Quote:Original post by carmelloseDOF 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.
is there a way to implement this with a shader (even with CGFX) or is that not appropriate at all ?
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
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
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
http://ati.amd.com/developer/gdc/Scheuermann_DepthOfField.pdf
The OpenGL red book has an example of DOF.
Look for 'Example 10-5 : Creating a Depth-of-Field Effect: dof.c' on this page :
http://fly.srk.fer.hr/~unreal/theredbook/chapter10.html
Look for 'Example 10-5 : Creating a Depth-of-Field Effect: dof.c' on this page :
http://fly.srk.fer.hr/~unreal/theredbook/chapter10.html
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement