mirror of
https://github.com/blender/blender
synced 2026-11-22 03:45:13 +03:00
This adds support for the Index Switch node to shader nodes. It is already supported in Geometry Nodes and the compositor. The implementation is done entirely at the node-tree-inlining level, so all render engines are supported automatically. There are two main cases to consider: * Index is constant value: The Index Switch node is completely optimized away and only the used input is evaluated. It works with all socket types. * Index is varying: The Index Switch node is replaced by a couple of math and mix nodes. This currently works for float, int, bool, vector, color and shader sockets (but not bundle, closure and menu sockets). When the index is out of range, the output is the fallback value (generally 0 or black). Pull Request: https://projects.blender.org/blender/blender/pulls/162178
3 lines
132 B
Text
3 lines
132 B
Text
version https://git-lfs.github.com/spec/v1
|
|
oid sha256:5e11d9d095713e33c598672ca58192b5432218b7f68da2e57c3728e71bd01e30
|
|
size 1077402
|