
triangleSdf2d
sdf2d
triangleSdf2d
RayTK
v0.36
SDF for a 2D triangle.
Parameters
-
Shape
: Which type of triangle to produce. The types are defined by different sets of parameters.-
Equilateral Triangle
: -
Isosceles Triangle
: -
Inverted Isosceles Triangle
: -
Abritrary Triangle
:
-
-
Radius
: The distance from the center to each corner of the triangle. Used for equilateral triangles. -
Height
: The distance from the base of an iscosceles triangle to the opposite tip. -
Width
: The width of the base of an isosceles triangle. -
Point 1
: The first corner position, for an arbitrary triangle. -
Point 2
: The second corner position, for an arbitrary triangle. -
Point 3
: The third corner position, for an arbitrary triangle. -
Direction
:-
Right (X+)
: -
Left (X-)
: -
Up (Y+)
: -
Down (Y-)
:
-
Inputs
-
Radius Field
: (optional)- Coordinate Types:
vec2
- Context Types:
Context
MaterialContext
CameraContext
LightContext
RayContext
ParticleContext
- Return Types:
float
- Coordinate Types:
-
Height/Width Field
: (optional)- Coordinate Types:
vec2
- Context Types:
Context
MaterialContext
CameraContext
LightContext
RayContext
ParticleContext
- Return Types:
float
- Coordinate Types: