Skip to main content Link Menu Expand (external link) Document Search Copy Copied
boxSdf

boxSdf

Shortcuts:
Keywords:
  • box
  • cube
  • rectangle
  • square

SDF for a box, optionally infinite one one axis.

Parameters

  • Box Type: The type of box function.
    • Box Cheap: A bit more efficient but slightly less accurate.
    • Box: More accurate but slightly less efficient.
  • Infinite Axis: Axis along which the box should stretch infinitely.
    • None: Regular box.
    • X: Box is infinite along the x axis.
    • Y: Box is infinite along the y axis.
    • Z: Box is infinite along the z axis.
  • Translate: Move the center of the box.
  • Scale: The size of the box in each dimension.
  • Uniform Scale: Scaling applied to all dimensions of the `Scale`.
  • UV Mode:
    • None:
    • Bounds XYZ:
  • Optimize:

Inputs

  • Scale Field: (optional)
    • Coordinate Types: vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4