Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to create a depth of field effect with bokeh sprites in GLSL. Specifically, what i would like to do is, for each pixel:

  • See if the pixel is out of the focal range
  • If it is, draw a quad and apply a texture to provide a bokeh sprite.

This kind of implementation is seen in the Unreal Engine and by Matt Pettineo, however, both implementations are in DX11 and I'm using OpenGL.

I'm a bit stuck on the drawing a quad and applying a texture bit. Does anyone know how I can do this, or provide any relevant links as to how I can do this?

Thanks

share|improve this question
11  
You're stuck at "drawing a quad and applying a texture"? And you're trying to implement an advanced depth-of-field technique? Maybe you should slow down a bit, because if you can't draw a textured quad, you're not likely going to be able to draw DOF effects. – Nicol Bolas Sep 12 '12 at 1:47
2  
Still, an answer may help future users. – Byte56 Sep 19 '12 at 0:03

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.