colorizeSdf2d

material
colorizeSdf2d
RayTK
v0.42

Converts a 2D SDF to a striped distance pattern.

This pattern is useful for debugging purposes. While this is not a regular “material”, it is used to convert an SDF to a color output.

Parameters

Name Description Regular Handling Read-Only Handling
Enable
Enable Edge

Whether to show a border at the suface of the shape.

Baked Baked
Edge Thickness

Thickness of the shape border.

Runtime Baked
Edge Blending

Amount of blending applied to each side of the shape border.

Runtime Baked
Edge Color

The color for the shape border.

Runtime Baked
Inside Period

The tightness of the stripes inside the shape.

Runtime Baked
Inside Color 1

The first stripe color inside the shape.

Runtime Baked
Inside Color 2

The second stripe color inside the shape.

Runtime Baked
Outside Period

The tightness fo the stripes outside the shape.

Runtime Baked
Outside Color 1

The first stripe color outside the shape.

Runtime Baked
Outside Color 2

The second stripe color outside the shape.

Runtime Baked
Inside Phase Runtime Baked
Outside Phase Runtime Baked

Inputs

  • SDF: (required)
    • Coordinate Types: float vec2 vec3 vec4
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: float Sdf