Page MenuHome

Cycles: Only merge closures when data2 is equal
ClosedPublic

Authored by Lukas Stockner (lukasstockner97) on Jul 28 2015, 9:03 PM.

Details

Summary

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.

Diff Detail

Repository
rB Blender

Event Timeline

Lukas Stockner (lukasstockner97) retitled this revision from to Cycles: Only merge closures when data2 is equal.
Thomas Dinges (dingto) edited edge metadata.

Good catch! The fix looks ok to me.

This revision is now accepted and ready to land.Jul 28 2015, 9:06 PM
Sergey Sharybin (sergey) edited edge metadata.

Patch LGTM, please go ahead!

This revision was automatically updated to reflect the committed changes.