top of page
Writer's pictureDan

Polygon Planet: Post 7 - Glare, bloom and lens flare

Updated: Jan 11, 2023

I wanted to add some effects to make the sun glare as you look directly at it.

To achieve this I first experimented with my own SunGlare.cs script that increased the light intensity from the sun directional light as the angle between the camera angle and the light direction gets smaller.


I experimented with relating the intensity to different powers of that angle, and a simple quadratic relationship seemed to give a pleasing result.


After googling about how others achieve glare and lens flare I learned that the Universal Render Pipeline in Unity has a lot of these effects built in to what it calls volumetric post-processing. This made it very simple to add lens-flare, camera bloom with dirty lens effect, and realtime adjustments to the scene colour, contrast and exposure.


I was really pleased with the combined effect of these built in post-processing effects plus my own SunGlare.cs script to increase the sun intensity as you look directly at it.








3 views0 comments

Kommentarer


bottom of page