Spot Lights // OpenGL Tutorial #23
In this video I'm going to show you how to implement the spot light effect in OpenGL. This effect is useful for flashlights and even certain types of street lights. Make sure to watch all the previous tutorials in the "OpenGL For Beginners" playlist at https://youtube.com/playlist?list=PLA0dXqQjCx0S04ntJKUftl6OaOgsiwHjA Please visit https://ogldev.org to see more of my tutorials on modern OpenGL. Link to source: https://github.com/emeiri/ogldev/blob/master/tutorial23_youtube To get the version of the sources that was used in the video checkout the tag TUT_23_SPOT_LIGHT. OpenGL 4.6 specification: https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf Special thanks - Modeling artists: James Ray Cock - https://polyhaven.com/a/vintage_wooden_drawer_01, https://polyhaven.com/a/vintage_grandfather_clock_01 Gugurun - https://www.cgtrader.com/free-3d-models/character/fantasy/female-zomebie-by-pimmy Audio: Title : Jumpscare & Horror Scream Loud @Horrorin Editing and mixing : https://www.youtube.com/hadwinchannel Original content video link : https://youtu.be/akPH8wKUpCc An Jone - "Time to Spare" - youtube audio library. Timecodes 0:00 Intro 0:57 Common characteristics of point and spot lights 1:17 Unique characteristics of the spot light 2:06 Example of different cut-off angles 2:42 Transforming the spot light direction 3:56 The cut-off angle 5:46 Graceful decrease of light intensity 7:18 Start of code review 7:27 The fragment shader 9:44 The LightingTechnique class 11:06 Transforming the direction from world to local 11:42 Changes to the application code Feel free to comment below. Email: [email protected] Facebook: https://www.facebook.com/Ogldev-188319114585587 GIthub: https://github.com/emeiri/ogldev.git Twitter: @ogldev One time donations (Paypal): https://ogldev.org/donate.html Patreon: https://www.patreon.com/ogldev My gear (Amazon affiliate links): Camera - Canon EOS M50: https://amzn.to/3duVIOh Camera mic - Rode Videomic: https://amzn.to/3dsGVDs Desktop mic - Rode NT-USB-Mini: https://amzn.to/3giMoif Credits: https://www.pexels.com/photo/two-lighted-pendant-lamps-266688/ https://pixabay.com/illustrations/flashlight-desk-spotlight-wood-3519697/ Enjoy, Etay Meiri #opengl #ogldev #opengtutorials
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.