How Ray Casting and Sphere Intersection Works // Ray Tracing Series @TheCherno
How Ray Casting and Sphere Intersection Works // Ray Tracing Series  @TheCherno
Uploaded July 2022 | Updated November 2026, 16 hours ago
Visit brilliant.org/TheCherno to get started learning STEM for free, and the first 200 people will get 20% off their annual premium subscription. AMAZING place to learn all the math you'll need for this series!

Support on Patreon ► patreon.com/thecherno
Discord (#raytracing-series) ► discord.gg/thecherno
Source code ► github.com/TheCherno/RayTracing

🧭 FOLLOW ME
Instagram ► instagram.com/thecherno
Twitter ► twitter.com/thecherno
Twitch ► twitch.tv/thecherno

Learn C++ with my series ► youtube.com/watch?v=18c3MTX0PK0&list=PLlrATfBNZ98dudnM48yfGUldqGD0S4FFb

📚 RESOURCES (in order of complexity)
🟢 Ray Tracing in One Weekend series ► raytracing.github.io
🟡 Scratch a Pixel ► scratchapixel.com
🔴 Physically Based Rendering: From Theory to Implementation ► amzn.to/3y2bGK7

💾 SOFTWARE you'll need installed to follow this series
Visual Studio 2022 ► visualstudio.microsoft.com
Git ► git-scm.com/downloads
Vulkan SDK ► vulkan.lunarg.com

Welcome to the exciting new Ray Tracing Series! Ray tracing is very common technique for generating photo-realistic digital imagery, which is exactly what we'll be doing in this series. Aside from learning all about ray tracing and the math to goes into it, as well as how to implement it, we'll also be focusing on performance and optimization in C++ to make our renderer as efficient as possible. We'll eventually switch to using the GPU instead of the CPU (using Vulkan) to run our ray tracing algorithms, as this will be much faster that using the CPU. This will also be a great introduction to leveraging the power of the GPU in the software you write. All of the code episode-by-episode will be released, and if you need help check out the #raytracing-series channel on my Discord server. I'm really looking forward to this series and I hope you are too! ❤️

CHAPTERS
0:00 - Intro
2:28 - Setup in Hazel
3:37 - Casting rays
7:51 - Visualizing ray direction
9:43 - Visualizing sphere intersection
14:36 - Calculating and visualizing sphere hit coordinates
18:35 - Calculating normals
21:43 - Lighting
24:23 - Visualizing rays and hit points
25:22 - Only evaluating one solution
25:56 - The effect of normalisation
27:35 - To normalize or not to normalise
29:32 - Some notes about optimization

This video is sponsored by Brilliant.

#RayTracing
How Ray Casting and Sphere Intersection Works // Ray Tracing SeriesFAST Random in 3 LINES OF CODE // Ray Tracing series2000 HOUR 2D Game Engine! // Code ReviewHow to Properly Setup C++ ProjectsPATH TRACER made by 15-YEAR-OLD in C++ OpenGL! // Code ReviewDEV LOG #1Rendering Sprite Pixels in C++Materials and Physically Based Rendering // Ray Tracing series40 Days.5 Easy Ways to Improve This C++ CodeThe Most Professional C++ Project Ive Ever Reviewed // Code ReviewHow Assets/3D Meshes Work in my Game Engine #Hazel #GameEngine #Shorts
The Cherno |

How Ray Casting and Sphere Intersection Works // Ray Tracing Series

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER