3D SDF Functions

Sphere - exact
float sdSphere( vec3 p, float s )


Box - exact
float sdBox( vec3 p, vec3 b )


Torus - exact
float sdTorus( vec3 p, vec2 t )


Cone - exact
float sdCone( vec3 p, vec2 c, float h )


Rounded Cylinder - exact
float sdRoundedCylinder( vec3 p, float ra, float rb, float h )


Cut Hollow Sphere - exact
float sdCutHollowSphere( vec3 p, float r, float h, float t )


Death Star - exact
float sdDeathStar( vec3 p2, float ra, float rb, float d )


Pyramid - exact
float sdPyramid( vec3 p, float h )


Twist
float opTwist( in sdf3d primitive, in vec3 p )


Bend
float opCheapBend( in sdf3d primitive, in vec3 p )


Vertical Capped Cylinder
float sdCappedCylinder( vec3 p, float h, float r )
