Game Engine 19: Lens Flare @s0lly
Game Engine 19: Lens Flare  @s0lly
Uploaded September 2020 | Updated September 2026, 2 hours ago
This series of videos will demonstrate my progress in making a Game Engine in OpenGL.


I added a soft lens flare effect, gives a very nice feel but not overpowering, which I find to be quite annoying when the effect is overplayed. In fact, it's possible I've undercooked it here (I'm fine with that)! I used the following shader with a number of adjustments to make it work in a game world: shadertoy.com/view/4sX3Rs



I've also fixed the jarring jittering effect that was occuring in the last video by making a few changes:
1. split world space into two components (integer and floating point) to make sure that I keep floating point accuracy for larger stretches of world space
2. convert all positions closer to camera space before entering shader code, meaning that positions closer to the camera have more accuracy
3. corrected some of the code relating to how the camera "follows" the ship
It's likely point 3 that was the largest contributor to the issue, but the other changes should help longer term for the project too.


Lastly, I adjusted the colour and BRDF parameters to make the various bodies look a bit more interesting (and less shiny!).


As before, this engine does not use any libraries; I'm trying to learn everything by hand here (perhaps a slightly ridiculous endeavour).


Learning Sources:

- Real-Time Rendering, 4th Edition
- learnopengl.com
- OpenGL Programming Guide (the "Red Book"), 9th Edition
- khronos.org/registry/OpenGL-Refpages/gl4
- Game Physics Engine Development, 2nd Edition
- Foundations of Game Engine Development (Book Series)
- OpenGL 4 Shading Language Cookbook, 3rd Edition
- Game Engine Architecture, 3rd Edition
- Handmade Hero YouTube series by Casey Muratori
- shadertoy.com





Other Social Media stuffs:

twitch.tv/s0llygaming
twitter.com/s0lly
instagram.com/s0lly.gaming
github.com/s0lly
patreon.com/s0lly
Game Engine 19: Lens FlareProject Overlay 04: MazesC++ FPS Raycaster Engine (v0.3) - Perspective Issue Solved!First Games in C++: Dungeons and Flagons (v0.2) - Map Design + Collision Detections0llys [CELL]IVIZATION: Trailer - Game in ExcelFirst Games in C++ - PacMan (Update 2)First Games in C++: Krazy Karts (v0.77) - Music, Sound, Start / End Race Scenes, Improved GUIFirst Games in C++: Dungeons and Flagons (v0.6) - OLC 2018 Game Jam Submission!KSP: Orbit in 2 Launches on Career Hard ModeGame Engine 15: PlanetsClick-Through Windows feat. Bevy [Rust]First Games in C++: Krazy Karts (v0.7) - Simple GUI + A Test Trial!
s0lly |

Game Engine 19: Lens Flare

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER