Skip to main content

Module material_nodes_v4

Module material_nodes_v4 

Source
Expand description

The fourth part of the node library: general “Math” / “Vector math” nodes with an operation selector, Blender-style texture generators with several outputs, an image texture with its own file, curves, mapping and colour tools. It also holds the table of extra outputs that any node may have and the conversions a linked input can apply. See crate::material_graph.

Enums§

SocketType
What kind of data a socket naturally holds; used for colouring sockets and picking the conversion of a new link.

Constants§

BLEND_MODES
Blend modes of “Mix colour” (same order as lib_blend).
CONVERSIONS
How a linked input converts the incoming value before use. Every socket carries a vec3, so the conversion decides what a number input reads from a colour or a vector (and the other way).
FRAGMENT_ONLY
Nodes that cannot feed a vertex offset.
HELP
English and Russian help of the nodes in this file.
MATH_OPS
Operations of the “Math” node, in the order of its selector.
MESH_ONLY
Nodes of this file that sample textures or use derivatives (not in camera effects / vertex stage).
V4_SPECS
Nodes added in the fourth wave.
VECTOR_OPS
Operations of the “Vector math” node.

Functions§

choices
Named choices of selector parameters (node kind, parameter index) shown as drop-downs.
conversion_badge
Short badge drawn next to a converted input.
default_conversion
The conversion a fresh link from from to to should use: a colour or a vector plugged into a number reads its brightness or length; everything else passes as it is.
input_type
The type of input index of a node kind.
output_type
The type of output index of a node kind.
outputs
Extra outputs of a node: name and a WGSL expression where {v} is the node’s main result and {0}.., {p0}.. are its inputs and parameters, like in the main expression. Output 0 is always the main result; nodes missing here have only that one.