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

round

Adds to (or subtracts from) the size of an SDF, which has the effect of rounding it out or shrinking it.

Based on code from Inigo Quilez. See example.

Parameters

  • Amount: positive numbers increase and round out the shape, negative numbers shrink it.
  • : whether to use the second input to determine the amount of rounding using a value field so various positions can use different amounts of rounding.
  • Enable:

Inputs

  • definition_in: (required)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float vec4 Sdf
  • amount_field_definition_in: (optional)
    • Coordinate Types: float vec2 vec3
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext
    • Return Types: float

Variables

  • sdf: