
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

Beat Up Spiffy Pictures V6.9 remix remix-2
by bonzi346

参照数製造ゲーム~君も人気スクラッチャー!?~【放置可能】【お手軽】【スマホ対応】
by boudannsyounenndann

Spanish Alphabet Lore cast vector
by dantethecreator2021

Super Mario Online Multiplayer
by Playstation666

会社経営ゲーム - v2.0.7
by 8017sub

beat up T series
by Chadandkaliroy

Beat Up Maya: Super Ultra Deluxe Edition
by DaveAndBambi2022

Beat up edward remasterd
by Hami2909320

Beat Up MarioBro 7
by pastaguy

Numberblocks plus
by super_Monkey_

angry birds scratch edition
by creator12121341

midiTest
by johnm

01戦争:壱章#6「past」
by sansdaaaa

Add a button to beat up Mega Photo! [16] remix remix
by Calebb1109

SUPER MARIO 64 3D: Peaches Castle
by Caminati0ns

Interstellar-A Dodger Game
by Nihar_coding

☁️ Weather Lookup ☁️ by Timka35
by Timka35

Undertale Battle Simulator -- Genocide Undyne
by titan4512

Undertale Asriel Fight But with LIVE LOVE LIE
by Heluva_Boss_Fan

阿吽のビーツ【オリキャラPV】
by you-423

BDW2010's Paper Minecraft SMP
by BDW2010

Advanced Ecosystem_ V1.9
by Chatter_Boy

Scratch Run
by GentleX

Star Wars: Squadrons (1.4) The Battle of Hoth
by Dudalego