polygonSdf2d

polygonSdf2d

sdf2d
polygonSdf2d
RayTK
v0.42

SDF for several types of 2D polygons.

Parameters

Name Description Regular Handling Read-Only Handling
Shape Runtime Semi-Baked
  • Pentagon:
  • Hexagon:
  • Octogon:
  • Custom:
Radius

The distance from the center to each edge.

Runtime Baked
Sides Runtime Baked

Inputs

  • Radius Field: (optional)
    • Coordinate Types: vec2
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: float
  • Sides Field: (optional)
    • Coordinate Types: vec2
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: float
    • Supports Variables From Inputs: radiusField