Blender V5.3
builtin::socket Namespace Reference

Classes

struct  Parameters
struct  ParametersInstancing
struct  Resources
struct  VertOut
struct  FragOut

Enumerations

enum  SocketDisplayShape : int {
  SOCK_DISPLAY_SHAPE_CIRCLE = 0 , SOCK_DISPLAY_SHAPE_SQUARE = 1 , SOCK_DISPLAY_SHAPE_DIAMOND = 2 , SOCK_DISPLAY_SHAPE_CIRCLE_DOT = 3 ,
  SOCK_DISPLAY_SHAPE_SQUARE_DOT = 4 , SOCK_DISPLAY_SHAPE_DIAMOND_DOT = 5 , SOCK_DISPLAY_SHAPE_LINE = 6 , SOCK_DISPLAY_SHAPE_VOLUME_GRID = 7 ,
  SOCK_DISPLAY_SHAPE_LIST = 8
}

Functions

void main_vert (const Resources &srt, const Parameters &params, const ParametersInstancing &params_inst, const int vert_id, const int inst_id, float4 &out_pos, VertOut &v_out)
float square_sdf (float2 absCo, float2 half_size)
float2 rotate_45 (float2 co)
float2 calculate_thresholds (float aa_size, float threshold)
void main_frag (const VertOut &v_out, FragOut &frag_out)

Variables

static constexpr int MAX_SOCKET_PARAMETERS = 4
static constexpr int MAX_SOCKET_INSTANCE = 32

Enumeration Type Documentation

◆ SocketDisplayShape

Enumerator
SOCK_DISPLAY_SHAPE_CIRCLE 
SOCK_DISPLAY_SHAPE_SQUARE 
SOCK_DISPLAY_SHAPE_DIAMOND 
SOCK_DISPLAY_SHAPE_CIRCLE_DOT 
SOCK_DISPLAY_SHAPE_SQUARE_DOT 
SOCK_DISPLAY_SHAPE_DIAMOND_DOT 
SOCK_DISPLAY_SHAPE_LINE 
SOCK_DISPLAY_SHAPE_VOLUME_GRID 
SOCK_DISPLAY_SHAPE_LIST 

Definition at line 131 of file gpu_shader_node_socket.bsl.hh.

Function Documentation

◆ calculate_thresholds()

float2 builtin::socket::calculate_thresholds ( float aa_size,
float threshold )

Definition at line 163 of file gpu_shader_node_socket.bsl.hh.

References abs, and calculate_thresholds().

Referenced by calculate_thresholds(), and main_frag().

◆ main_frag()

◆ main_vert()

void builtin::socket::main_vert ( const Resources & srt,
const Parameters & params,
const ParametersInstancing & params_inst,
const int vert_id,
const int inst_id,
float4 & out_pos,
VertOut & v_out )

◆ rotate_45()

float2 builtin::socket::rotate_45 ( float2 co)

Definition at line 157 of file gpu_shader_node_socket.bsl.hh.

References from_rotation(), M_PI, and rotate_45().

Referenced by main_frag(), and rotate_45().

◆ square_sdf()

float builtin::socket::square_sdf ( float2 absCo,
float2 half_size )

Definition at line 144 of file gpu_shader_node_socket.bsl.hh.

References dot(), max, min, square_sdf(), float2::x, and float2::y.

Referenced by main_frag(), and square_sdf().

Variable Documentation

◆ MAX_SOCKET_INSTANCE

int builtin::socket::MAX_SOCKET_INSTANCE = 32
staticconstexpr

Definition at line 14 of file gpu_shader_node_socket.bsl.hh.

◆ MAX_SOCKET_PARAMETERS

int builtin::socket::MAX_SOCKET_PARAMETERS = 4
staticconstexpr

Definition at line 13 of file gpu_shader_node_socket.bsl.hh.

Referenced by main_vert().