
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

[GAME] Skiing Panda
by CauchySheep

Geometry Dash B
by iPhone_ATT_TWC115

Osu! Mania V3 but i changed it a little bit
by Galaxozhi

UPDATE talking tom and ben news V2 added all remix
by bonzi346

flixheff’s nextbots
by flixheff

Trailer • Crossy Road Remake • 3D
by JloAu

Beluga Dash 2
by LukeMaster999

Geometry Dash Meltdown v1.5
by boxtop309

Windows 10.5 (SCRATCH EDITION)
by StickRobot7

UN owen was her?88000notes!
by hevean_3

car and cat project
by coeus101

3 Player test
by krithike4

Beat up Sonic (1) 4remixs at once remix
by kubakoodziejczak

Scratch Life (Conway's "Game of Life")
by DadOfMrLog

ROBLOX laser tag
by 11builderboy11

Magic Cat Academy 魔法喵學院
by h106099

The Chase
by codingronzie

BRAWL STARS (SCRATCH)
by Sunny313

ONE NIGHT AT BONNIES
by sonicfan_2

FNF' remix | TEST SONG (better)
by KrazyKaid

Ink!sans FIght インクサンズ戦 UndertaleAU
by yonezawa3834_java

スプラトゥーンっぽい!?プラットフォーマー!!
by sgihyt781

intro for Quimexus
by yusei0108

The Battle Cats: Last Fall
by groovicbe