Ray Marching Simple Shapes
The Art of Code
Twitter: @The_ArtOfCode Facebook: https://www.facebook.com/groups/theartofcode/ Patreon: https://www.patreon.com/TheArtOfCode PayPal Donation: https://paypal.me/theartofcode
Live version: https://www.shadertoy.com/view/wdf3zl
In this video I'll go over the distance functions to several primitive shapes: sphere, capsule, torus, box and capped cylinder. These shapes form the building blocks of just about any complicated shape you want to make so it is good to understand how these functions work.
If you just want to copy past a bunch of distance functions, you can find an exhaustive list of them, along with function to manipulate them here: https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm ... https://www.youtube.com/watch?v=Ff0jJyyiVyw
115087683 Bytes