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
All Sonic Buttons remix
by jakubko2010
talking tom and ben news disaster waiting in scratch edition
by sonicgamersspeed
SPRUN only some have anomations
by rgretful
Untited
by A_USERNAME690
Minecraft.
by gigant3867
wither storm
by TotallyFake_GVERSE
KyleWare: Ultimate Microgames! (v0.4)
by saulosergiostick
AYS - Child's Play - FNF: Pibby: Apocalypse - REWORKED VERSION - HIGH EFFORT
by bbbluey
Add a button to beat Pingu
by pedroisbacktoscratch
Shin sonic story part 1
by Bowser-Bro11
Bootup of Samsung Galaxy Book 2012
by Arham3846
Beat up Edward plus
by Jesse66000
Mario Maker but hes big remix
by gubbyjosh
Geometry Dash CFB: Stereo Madness
by hoppingicon
Turbowarp Tetris
by CodeLearner321
Minecraft V2.1 (added textures)
by wavelets
音ブロックで『megalovania』
by kapotan912
Numberblocks: 300 to 399
by KJRichardson2009
Talking Tom 2 remix
by weepwoopz
FNF Test Playground (WIP) Anti-Piracy Screen
by Willboy201111
add a button to beat up Green flag!
by Seth5470
Random Number Generator (1 to 2000) remix
by IAmNotA-10IMN666M3
OMNI SANS!!
by Roomsisthebestgame2
-<[{(Collabs)}]>- talking tom and ben news HD remix
by kuponoIs