In this shader tutorial, we will go over the basics of Ray Marching with Signed Distance Fields. We start by understanding the theory behind the algorithm. Then we implement a simple ray marcher in GLSL. After that, we calculate the normals and add lighting to the scene. Then we run the ray march algorithm again to calculate shadows. Finally, we learn how to blend to SDFs using the smooth union operation.
📖 Code - https://github.com/SuboptimalEng/shad...
🎥 YouTube - / suboptimaleng
🐦 Twitter - / suboptimaleng
📸 Instagram - / suboptimaleng
💻 GitHub - https://github.com/SuboptimalEng
🌎 Website - https://suboptimaleng.com
== [ Resources ] ==
Ray Marching Tutorial - https://michaelwalczyk.com/blog-ray-m...
Inigo Quilez’s Articles - https://iquilezles.org/articles
The Book of Shaders - https://thebookofshaders.com
Simon Dev’s Shader Course - https://simondev.teachable.com
Intro to Phong Lighting - • Introduction to Phong Lighting
VS Code GLSL Shader Setup Guide - • How to Write GLSL Shaders in VS Code
== [ Timestamps ] ==
00:00 Intro to Ray Marching
00:59 Ray Marching Algorithm
03:15 Coding a Ray Marcher
06:18 Add Lighting with Normals
07:47 Ray March Shadows
09:14 Blend with Smooth Union
== [ Tags ] ==
#suboptimal #glsl #shaders