This patch adds a check for data2 in shader_merge_closures, therefore fixing T45583 (at least partially).
The problem was that glass IOR is stored in data2, which was not checked, so that the three reflection/refraction shaders were (incorrectly) merged.
With this patch, the result is still not perfect, but 1. it's quite a lot better and 2. this is a bug nevertheless.
Also, it adds data2 assignments to some Closures to avoid problems with uninitialized variables.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender