MaterialX: Implement White Noise node #113495
|
@ -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
|
||||
switch (dimension) {
|
||||
DagerD marked this conversation as resolved
Outdated
Bogdan Nagirniak
commented
Are there existing constants? Are there existing constants?
|
||||
case 1:
|
||||
noise = create_node("cellnoise2d",
|
||||
DagerD marked this conversation as resolved
Outdated
Bogdan Nagirniak
commented
Optimize getting values, only w is used here Optimize getting values, only w is used here
|
||||
NodeItem::Type::Float,
|
||||
|
|
Loading…
Reference in New Issue
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