
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

Kirby's Dreamland 3 Maker
by BenjaminWins11

Friday night funkin' VS Herobrine [DEMO]
by vollrineVPS1

Beat up roblox people(0.5)
by 25year5pupil4

Let's Make KNE Sans Serif: A Latin Extended Font! | v2.4.9
by WindowsMeRules2000

<[{(COLLABS)}]>talking tom and ben news hd 9: muchos gracias copy remix
by everton_trader2

beat up king tuck mooooore!
by CLAX1212

Talking News [REMASTERED] Ultra Remix
by LaytonHasFancyStuff

2D Minecraft V1.19 お金ある世界
by pira_kurahuto

GD level: "Dash" [Credits in notes] [unplayable]
by shai

3D Terrain Generator
by kevin_eleven_1234

SPIFFY PICTURES EXE. Buttons V40 Spiffy.exe
by gtmosaics

Spanish Alphabet Lore: Lowercase Sprites (Accurate Version)
by BryanTheAnimator

add a button to beat up Nano: 2024 edition [1]
by Super_Isaac_64

IENE Megifinity [1] (START to -₪)
by OctoNEs

Beat Up Viacom
by JSA1524

Cheating (FULLY PLAYABLE) VS Dave and Bambi
by darwiniscute

SLAP remix
by KubaKo_Player

Johnny vs Funny Valentine
by VLADSSJ123

[Undertale] - The Final Experiment
by LucasBr003

Stay Put Survival: The Expansion Update
by OopsieDaisy_

FNF ∆Triple PhoneBreakers∇ Playable
by Cuphead78250

Geometry Dash Level Editor 2.98.9
by iPhone_ATT_TWC_tests

Trollsome Runner 3D (Beta)
by IMACREEPER

Dragons’ Cave - A Parallax #art
by babe_ri400