boxSdf

boxSdf

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

SDF for a box, optionally infinite one one axis.

Parameters

Name Description Regular Handling Read-Only Handling
Boxtype

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.

Runtime Runtime
  • 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.

Runtime Baked
Scale

The size of the box in each dimension.

Runtime Baked
Uniform Scale

Scaling applied to all dimensions of the Scale.

Runtime Baked
UV Mode Semi-Baked Semi-Baked
  • None:
  • Bounds XYZ:
  • Faces:
Optimize

Inputs

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