round

round

filter
round
RayTK
v0.39

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

Name Description Regular Handling Read-Only Handling
Amount

positive numbers increase and round out the shape, negative numbers shrink it.

Runtime Baked
Usefield

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

  • SDF: (required)
    • Coordinate Types: float vec2 vec3 vec4
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: float vec4 Sdf
  • Amount Field: (optional)
    • Coordinate Types: float vec2 vec3 vec4
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: float
    • Supports Variables: sdf
    • Supports Variables From Inputs: inputOp1

Variables

  • sdf: