dcae48d1d395514e23d515685ad68ee7ebfa83f7
It allows to implement tricks based on a knowledge whether the path ever cam through a portal or not, and even something more advanced based on the number of portals. The main current objective is for strokes shading: stroke shader uses Ray Portal BSDF to place ray to the center of the stroke and point it in the direction of the surface it is generated for. This gives stroke a single color which matches shading of the original object. For this usecase to work the ray bounced from the original surface should ignore the strokes, which is now possible by using Portal Depth input and mixing with the Transparent BSDF. It also helps to make shading look better when there are multiple stroke layers. A solution of using portal depth is chosen over a single flag due to various factors: - Last time we've looked into it it was a bit tricky to implement as a flag due to us running out of bits. - It feels to be more flexible solution, even though it is a bit hard to come up with 100% compelling setup for it. - It needs to be slightly different from the current "Is Foo" flags, and be more "Is Portal Descendant" or something. An extra uint16 is added to the state to count the portal depth, but it is only allocated for scenes that use Ray Portal BSDF. Portal BSDF still increments Transparent bounce, as it is required to have some "limiting" factor so that ray does not get infinitely move to different place of the scene. Ref #125213 Pull Request: https://projects.blender.org/blender/blender/pulls/143107
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
