boxSdf

boxSdf

Shortcuts:
  • box
Keywords:
  • box
  • cube
  • rectangle
  • square
sdf
boxSdf
RayTK
v0.36

SDF for a box, optionally infinite one one axis.

Parameters

  • : The type of box function.
    • : A bit more efficient but slightly less accurate.
    • : 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:
    • Faces:
  • Optimize:

Inputs

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