GLSL Bokeh using Quads and Textures

Posted by Notoriousaur on Game Development See other posts from Game Development or by Notoriousaur
Published on 2012-09-12T01:44:47Z Indexed on 2012/09/12 3:49 UTC
Read the original article Hit count: 391

Filed under:
|

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

© Game Development or respective owner

Related posts about opengl

Related posts about glsl