postprocessing
postprocessing copied to clipboard
Implement DepthOfFieldEffect
Description
Implement a DepthOfFieldEffect based on the implementation in v6.
References:
- https://www.adriancourreges.com/blog/2018/12/02/ue4-optimized-post-effects/
Tasks
- [ ] Create CoC shader.
- [ ] Create blur shader.
- [ ] Create
DepthOfFieldEffect. - [ ] Create
depth-of-fielddemo. - [ ] Add unit test.
Implementation Details
- Check the linked article for potential improvements.
- Should be done after
PoissonBlurMaterialhas been implemented. - The CoC should be calculated based on fragment distance instead of depth.
- Add support for logarithmic depth.
- Consider adding options for fringe/chromatic aberration and luminance gain.
what's the difference this and the v6 implementation?
Support for log depth and inversed depth, better configuration options and more natural circle of confusion based on distance instead of linear depth. There may also be some other aspects that can be improved based on the linked article.