polygonSdf2d

polygonSdf2d

sdf2d
polygonSdf2d
RayTK
v0.36

SDF for several types of 2D polygons.

Parameters

  • Shape:
    • Pentagon:
    • Hexagon:
    • Octogon:
    • Custom:
  • Radius: The distance from the center to each edge.
  • Sides:

Inputs

  • Radius Field: (optional)
    • Coordinate Types: vec2
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float
  • Sides Field: (optional)
    • Coordinate Types: vec2
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float