Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2022-10-09 21:15:48 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2022-10-15 22:08:54 +0300
commit665b37f96e4806a0e8e077b0d8a1f7b1764cdcd1 (patch)
treeb3b3f9e403af4dc5d2f2a296f5e8d2d1a127cd84 /source/blender/blenkernel/intern/paint.cc
parenta0c534f77ffd4a19e4daa5bec8a61e2dd89d0720 (diff)
Eevee: implement conditional evaluation of Mix node branches.
If the material effectively combines multiple distinct materials using some kind of mask texture, it is wasteful to evaluate all of them when the mask fully excludes some. Cycles already supports this optimization for Mix Shader nodes. This implements a similar feature for Mix Shader and Mix Color Blend nodes in Eevee: shader matches Cycles, and mixing colors can be used for a similar purpose in NPR shaders. To achieve that, a Conditional node type directly supported by code generation is added. Shader nodes can add these conditionals as needed, and the code generator partitions the node graph into a branch tree and appropriately generates conditionals. Empty conditionals are automatically eliminated to avoid any performance impact. This processing is done separately for every sub-graph to minimize dependency cross-contamination. Differential Revision: https://developer.blender.org/D16218
Diffstat (limited to 'source/blender/blenkernel/intern/paint.cc')
0 files changed, 0 insertions, 0 deletions