MaterialX: Implement White Noise node #113495

Merged
Brecht Van Lommel merged 7 commits from DagerD/blender:matx-add-white-noise-node into main 2023-10-23 17:31:51 +02:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit a1f12e8ca9 - Show all commits

View File

@ -191,7 +191,8 @@ NODE_SHADER_MATERIALX_BEGIN
NodeItem noise = empty();
NodeItem vector = get_input_link("Vector", NodeItem::Type::Vector3);
NodeItem w = get_input_value("W", NodeItem::Type::Float);
switch (node_->custom1) {
int dimension = node_->custom1;
DagerD marked this conversation as resolved Outdated

Add variable which name this node option: int <option name> = node_->custom1.
See example https://projects.blender.org/blender/blender/src/branch/main/source/blender/nodes/shader/nodes/node_shader_math.cc#L186

Add variable which name this node option: `int <option name> = node_->custom1`. See example https://projects.blender.org/blender/blender/src/branch/main/source/blender/nodes/shader/nodes/node_shader_math.cc#L186
switch (dimension) {
DagerD marked this conversation as resolved Outdated

Are there existing constants?

Are there existing constants?
case 1:
noise = create_node("cellnoise2d",
DagerD marked this conversation as resolved Outdated

Optimize getting values, only w is used here

Optimize getting values, only w is used here
NodeItem::Type::Float,