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

rectangleSdf

SDF for a 2D rectangle.

Parameters

  • Translate: Moves the center of the rectangle.
  • Scale: The size of the rectangle on the x and y axes.
  • UV Mode:
    • XY Normalized:
    • XY Fit to Outside:

Inputs

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