rectangleSdf

rectangleSdf

sdf2d
rectangleSdf
RayTK
v0.36

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: vec4