Rendu
A lightweight rendering engine for experimentations
|
Dof gather fragment shader. More...
Public Member Functions | |
void | main () |
Public Attributes | |
in vec2 | uv |
UV coordinates. | |
uniform uniform vec2 | invSize |
Pixel shift. | |
out vec4 | fragColor |
Scene color. | |
Dof gather fragment shader.
|
inline |
Generate a depth of field effect by gathering in a neighborhood of the current fragment using a spiral pattern and accumulating contribution from neighbors based on their circle-of-confusion radius. Based on "Bokeh depth of field in a single pass" by Dennis Gustafsson, 2018 (http://tuxedolabs.blogspot.com/2018/05/bokeh-depth-of-field-in-single-pass.html).