In this video we learn how to create an infinite grid using OpenGL. It is based on an article from the '3D Graphics Rendering Cookbook' (see link below).
🔥 See the list of the books that I'm using as background information for my tutorials: https://ogldev.org/books.html. I highly recommend them for learning more about OpenGL and Vulkan. These are affiliate links so if you use them to buy any of the books the price is the same for you and I will get a small commission (thank-you!).
📚 Timecodes 📚
0:00 Intro and background
1:42 Start with two triangles
3:19 Locking the square to the camera
4:23 Output the world space position
4:47 Modulate the position by the grid cell size
6:25 GLSL derivative functions
11:10 Render the vertical lines
12:23 Stabilizing the derivatives
13:47 Improving the aliasing situation
14:35 Level Of Detail
18:50 Cell size per LOD
20:00 Use the correct alpha
20:33 The Opacity Factor
21:30 Outro
🔥 Please visit https://ogldev.org to see more of my tutorials on modern OpenGL.
🔥Link to source:
https://github.com/emeiri/ogldev/tree...
If you want to get the same version of the code that was used in the video checkout the tag 'TUT_54_ENDLESS_GRID'
Feel free to comment below.
🔗Contacts:
🔹Email: [email protected]
🔹Instagram: @ogldev1
🔹Github: https://github.com/emeiri/ogldev.git
🔹TikTok - / ogldev
🔹Twitter: @ogldev
🔹One time donations (Paypal): https://ogldev.org/donate.html
🔹Patreon: / ogldev
🙏Credits:
🔹Log image by wikipedia (https://commons.wikimedia.org/wiki/Fi...)
🔹Log image by Krishnavedala (https://commons.wikimedia.org/wiki/Fi...)
🔹Sound effects by https://zapsplat.com
🔹Music by Julius H. from https://Pixabay.com
🔹"Final Girl" by Jeremy Blake - Youtube audio library
Enjoy,
Etay Meiri
#vulkan