Page MenuHome

[MNEE] Fix transmission depth calculation and add support for light path node in mnee related shader graphs
ClosedPublic

Authored by Olivier Maury (omaury) on May 10 2022, 4:58 AM.

Details

Summary

Transmission depth in cycles seems to be one less than the actual transmission depth, this path fixes the mnne code to confrom to this convention. Also added support for using light path nodes in light and refractive interfaces shader graphs, which might use depth.

See T97921 for an example scene leveraging both fixes.

Diff Detail

Repository
rB Blender

Event Timeline

Olivier Maury (omaury) requested review of this revision.May 10 2022, 4:58 AM
Olivier Maury (omaury) created this revision.
Olivier Maury (omaury) edited the summary of this revision. (Show Details)

The reason for the inconsistency in bounce depths is because of how we evaluate light shaders.

We evaluate them for all BSDFs at once, so we can't increase the diffuse/glossy/transmission depth, because that would require potentially evaluating the light shader multiple times, once for each BSDF type. So we only increase the overall bounce depth. This isn't really correct, but the main reason these depth controls exist is to do performance enhancing tricks, so doing extra work to make them more correct seems counterproductive.

This revision is now accepted and ready to land.May 17 2022, 9:05 PM