Port shader to Geometry Nodes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
- Branch
- master
- Build Status
Buildable 16498 Build 16498: arc lint + arc unit
Event Timeline
Comment Actions
I think the conversion to C++ should happen in a different commit / patch. Do you have commit rights @Charlie Jolly (charlie)?
Comment Actions
For some reason I cannot apply the patch easily.
I haven't tested it right now, but I think you can simplify the code significantly by using this:
static void sh_node_mix_rgb_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder) { bNode &node = builder.bnode(); bool clamp = node.custom2 & SHD_MIXRGB_CLAMP; int mix_type = node.custom1; builder.construct_and_set_matching_fn<MixRGBFunction>(clamp, mix_type); }
Comment Actions
See D11506 for patch for c++ conversion. I'll update this patch once that is accepted.
Comment Actions
This crashes for me when I add the node. I believe part of the signature building is missing, which is especially notable when compared to other nodes.
| source/blender/nodes/shader/nodes/node_shader_mixRgb.cc | ||
|---|---|---|
| 172 | Can you just use clamp_v3? | |
