
Realistic Lens Flare
by SpinningCube
Description
A quick test project I made to generate lens flares, the kind of lens effect which would be visible when you point a camera at a bright light source like the sun. The end result is a quite nice-looking effect. The effect is composed of many individual lens flare elements. I made two of the lens flare textures using external image editing software, each one is a simple shape colored white with a radial gradient ranging from opaque at the edges to partially transparent at the center. More transparency is added by the project itself. This is a clone-based method, which means each lens element is a clone (A stamp-based version is perfectly doable, though). The clone is assigned a random size, position factor, shape, and transparency. There are 30 clones in total, though this can be changed in the code depending on how many lens elements are needed. The lens elements' positions are all multiples of the sun position. Everything is done in 2D, but this can be applied to a 3D project if Sun X and Sun Y are set to the projected coordinates of the sun. This project doesn't lag very much, but it does look smoother on TurboWarp with these settings: https://turbowarp.org/666704223?hqpen&fps=60&limitless Updated 16 April 2022 - Added exposure adjustment, where the background darkens when looking directly at the sun. Changed the sun streaks to make them fade in when looking directly at the sun. Released 3 April 2022 Anyway here's a bunch of tags: #Sun #Light #Sunlight #Day #Sky #Glare #Camera #Lens #Flare #Effect #2.5D #3D #Math #Clones #Mobile
Project Details
- Visibility
- Visible
- Comments
- Enabled
More Cool Projects

Blue Mist Plus - All Jumpscares fixed
by TheReturnOfVehbi2010

The Simpsons Movie DVD Menu Play Movie Homer Falling (Japanese)
by Gumball1034

R.I.P. Beat up Stickman
by RGYBProductions

Geometry Dash UnBroKen 2
by d1a5

Add yourself/your oc singing Monochrome but my plushy
by ksh1411

The Battle Cats: Cuentos místicos!
by UUTTVM5

Crossy Road • 3D
by ANIKET0900CVBNM

~三代目~ 太鼓の達人 ニジイロver. v4.0.1
by Kuppi-scratch

|UNDERTALE| FULL GAME!
by fayri2017

run scratch all!
by SamiSamantaG

Paper Minecraft Updated
by Jump_Ninja

~Locked Out~ V1.18
by df21

Cannyblocks Band 2 Fixed
by 22168dj

★Cat Clicker!★
by ZAF253

Flappy Bird v2.2 [PC/M]
by BluePheonix25

Beat up Stickman
by michaelkenbernaldez

Jacob630 Jumpscare! (LAGGING)
by RobloxFan75000

Beat up DVD (use turbowarp)
by andpsaid

Evil Pocoyo goes to the beach with Dark Briffit/GROUNDED
by GrayBeaver2016

♬♪ 音感 - Sense of pitch ♪♬ Ver 1.11
by sousou_1125

FNWMT sparta
by Mrevilrichbot

FREE ADMIN V1
by SAM1234AZERTYJKI

Beat Up Bonzi Buddy -REVAMPED- Edition V5 (FIXED) More remix-3 remix
by Jaime133

Beat up Nano (0)
by ptv_23