Cycles: Expose diffuse and glossy depth to Light Path node
Was a bit confusing to have transparent and translucent depth exposed but no diffuse or glossy. Reviewers: brecht Subscribers: eyecandy Differential Revision: https://developer.blender.org/D2399
This commit is contained in:
@@ -27,6 +27,8 @@ shader node_light_path(
|
||||
output float IsVolumeScatterRay = 0.0,
|
||||
output float RayLength = 0.0,
|
||||
output float RayDepth = 0.0,
|
||||
output float DiffuseDepth = 0.0,
|
||||
output float GlossyDepth = 0.0,
|
||||
output float TransparentDepth = 0.0,
|
||||
output float TransmissionDepth = 0.0)
|
||||
{
|
||||
@@ -45,6 +47,14 @@ shader node_light_path(
|
||||
getattribute("path:ray_depth", ray_depth);
|
||||
RayDepth = (float)ray_depth;
|
||||
|
||||
int diffuse_depth;
|
||||
getattribute("path:diffuse_depth", diffuse_depth);
|
||||
DiffuseDepth = (float)diffuse_depth;
|
||||
|
||||
int glossy_depth;
|
||||
getattribute("path:glossy_depth", glossy_depth);
|
||||
GlossyDepth = (float)glossy_depth;
|
||||
|
||||
int transparent_depth;
|
||||
getattribute("path:transparent_depth", transparent_depth);
|
||||
TransparentDepth = (float)transparent_depth;
|
||||
|
Reference in New Issue
Block a user