lineSegmentSdf2d

lineSegmentSdf2d

sdf2d
lineSegmentSdf2d
RayTK
v0.40

2D line segment SDF.

The line segment is defined by two points. By default those come from the “Point A” and “Point B” parameters. But if the “Points Field” input is connected, it will use that to get the points instead.

Parameters

Name Description Regular Handling Read-Only Handling
Point 1 Runtime Baked
Point 2 Runtime Baked
Thickness Runtime Baked

Inputs

  • Point 1 Field: (optional) If connected, this field will be used to pick both points. The first point comes from the X and Y components of the vector that comes out of the field, and the second point will use the Z and W components.
    • Coordinate Types: vec2
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: vec4
  • Point 2 Field: (optional)
    • Coordinate Types: vec2
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: vec4
    • Supports Variables From Inputs: point1Field
  • Thickness Field: (optional)
    • Coordinate Types: vec2
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: float
    • Supports Variables: normoffset
    • Supports Variables From Inputs: point1Field point2Field

Variables

  • normoffset: