Preview: youtu.be/EeWqQ2Pjx6w
This realization of the lens flares uses a material (shader) to control lens flares opacity and particle system to render the effect. The material compares values stored in depth buffer with distance to camera for a few points on a screen. In simplest case, it compares depth value for center of a particle with distance from the particle to camera.
You can read more here: docs. /document/d/1NcfNhrp5kZoxbPIVS4eOEJiC3AVhqlvYYK4qPZ19pN8/edit?usp=sharing
Technical Details
- Correctly handles overlapping
- Works for all cameras and viewports, independently of FOV and aspect ratio
- Has options to control intensity in relation to size of overlapping area
- Works with split screen
- Doesn't implement any new UObjects in C++
- Runs on GPU side only
The package contains:
- A blueprint to create a light source with attached effect
- Lens Flare master material with various instances and flare texture
- Particle system that can be used as template to customized lens flare effects
- Demo level