Blender V5.3
builtin::nodelink Namespace Reference

Classes

struct  NodeLinkVertIn
struct  NodeLinkVertOut
struct  NodeLinkFragOut
struct  NodeLinkSRT

Functions

void vert (const int gl_VertexID, const int gpu_InstanceIndex, const NodeLinkSRT &srt, const NodeLinkVertIn &v_in, float4 &gl_Position, NodeLinkVertOut &interp)
float get_line_alpha (float2 line_uv, float line_thickness, float center, float relative_radius)
void frag (const NodeLinkVertOut &interp, NodeLinkFragOut &frag_out)

Detailed Description

2D Cubic Bezier thick line drawing uv.x is position along the curve, defining the tangent space. uv.y is "signed" distance (compressed to [0..1] range) from the pos in expand direction pos is the verts position in the curve tangent space

Function Documentation

◆ frag()

void builtin::nodelink::frag ( const NodeLinkVertOut & interp,
NodeLinkFragOut & frag_out )

Definition at line 178 of file gpu_shader_nodelink.bsl.hh.

References abs, ANTIALIAS, fract(), frag(), fragment, get_line_alpha(), in, interp(), max, min, and out.

Referenced by frag().

◆ get_line_alpha()

float builtin::nodelink::get_line_alpha ( float2 line_uv,
float line_thickness,
float center,
float relative_radius )

Definition at line 171 of file gpu_shader_nodelink.bsl.hh.

References abs, ANTIALIAS, get_line_alpha(), smoothstep(), and float2::y.

Referenced by frag(), and get_line_alpha().

◆ vert()