Light linking: Initial support of shadow linking #106501

Merged
Sergey Sharybin merged 2 commits from Sergey/blender:cycles-light-linking-shadow into cycles-light-linking 2023-04-04 10:18:52 +02:00

2 Commits

Author SHA1 Message Date
Sergey Sharybin 7724c87167 Light linking: Initial support of shadow linking
buildbot/vexp-code-patch-coordinator Build done. Details
buildbot/vexp-code-experimental-coordinator Build done. Details
The shadow linking is based on the Shadow State settings in the
light linking collection:

- None: the object is not shadow linked to the emitter

- Include: the object casts the shadow when lit by the emitter
  (and the emitter does not cast shadows from objects which are
  not linked to it).

- Exclude: the object does not cast shadow when is lit by the
  emitter (but the emitter casts shadows from other objects).

Linking shadows to the emitter implicitly disables MIS for lamps.
This is because getting MIS+shadow linking to work needs more
time (and it's not that trivial). The MIS for mesh emitters is
not disabled automatically, as it is a bit tricky: the MIS is a
shader setting, not an object setting.

The MIS support will be worked on later.

Another limitation is the Metal RT support which does not support
shadow linking yet, Need to get a development environment where
compilation takes less than 10min per kernel.

Ref #104972
2023-04-03 16:52:34 +02:00
Sergey Sharybin 745523604e Light linking: Initial implementation of shadow linking sets
Works similar to the light linking sets, just uses different set of
bit masks and the settings are coming from the collection shadow state.

Ref #104972
2023-04-03 16:52:22 +02:00