Depth of Field
Algorithm
- Clear the accumulation buffer
- Repeat for n samples:
- Render scene with random lens offset
- Add scene to accumulation buffer, multiply by 1/n
- Return accumulation buffer to back buffer and swap
-
Use GL_LOAD for first sample to avoid clear