Kemena3D
Loading...
Searching...
No Matches
kemena::kShaderNode Struct Reference

A node in the shader graph: a typed operation with input/output pins. More...

#include <kshadernode.h>

Static Public Member Functions

static const char * typeName (kShaderNodeType t)
 Returns a human-readable name for a shader node type.

Public Attributes

int id = 0
 Unique node id within the graph.
kShaderNodeType type = kShaderNodeType::ConstFloat
 Operation this node performs.
kString name
 Display name of the node.
float posX = 200.f
float posY = 200.f
 Node position in the editor canvas.
std::vector< kShaderPininputs
 Input pins.
std::vector< kShaderPinoutputs
 Output pins.
float valueFloat [4] = { 0.f, 0.f, 0.f, 1.f }
 Constant value for Const* nodes.
kString valueStr
 Texture uniform name or swizzle mask.
bool valueBool = false
 Generic boolean payload.

Detailed Description

A node in the shader graph: a typed operation with input/output pins.

Carries its editor position and a small type-specific payload (constant value, texture uniform name or swizzle mask, and a boolean flag).

Member Function Documentation

◆ typeName()

const char * kemena::kShaderNode::typeName ( kShaderNodeType t)
static

Returns a human-readable name for a shader node type.

Parameters
tNode type to name.
Returns
Static string label for the node type.

Member Data Documentation

◆ id

int kemena::kShaderNode::id = 0

Unique node id within the graph.

◆ inputs

std::vector<kShaderPin> kemena::kShaderNode::inputs

Input pins.

◆ name

kString kemena::kShaderNode::name

Display name of the node.

◆ outputs

std::vector<kShaderPin> kemena::kShaderNode::outputs

Output pins.

◆ posX

float kemena::kShaderNode::posX = 200.f

◆ posY

float kemena::kShaderNode::posY = 200.f

Node position in the editor canvas.

◆ type

kShaderNodeType kemena::kShaderNode::type = kShaderNodeType::ConstFloat

Operation this node performs.

◆ valueBool

bool kemena::kShaderNode::valueBool = false

Generic boolean payload.

◆ valueFloat

float kemena::kShaderNode::valueFloat[4] = { 0.f, 0.f, 0.f, 1.f }

Constant value for Const* nodes.

◆ valueStr

kString kemena::kShaderNode::valueStr

Texture uniform name or swizzle mask.


The documentation for this struct was generated from the following file: