top of page
  • Dan

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

Updated: Jan 11

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.

2 views0 comments

Recent Posts

See All

I am now content enough with the sky, sun, moon and stars to move on to detailing the terrain. I've been itching to get on to placement of trees and grass and was wondering which details to do first.

bottom of page