Fix T42621: Glossy world ray visibility affects on transmission rays
There seems to be inconsistency in flags checks in Cycles kernel. In the interface glossy means "Glossy Reflection" and it is properly taken into account when doing visibility check in BVH traversal. The check in indirect background/light emission was treating this flags as "any of glossy reflection or transmission" which is kind of weird. Made it so emission code follows ray visibility assumptions in other parts of the kernel now.
This commit is contained in:
parent
90a8aa2dab
commit
c8a9a563a7
Notes:
blender-bot
2023-06-21 19:23:24 +02:00
Referenced by commit 22dfb50622
, Fix T44128: Ray visibility only enables diffuse if glossy is also enabled
Referenced by issue #42621, Unchecking glossy ray option in ray visibility section of World settings also eliminates transmission rays
|
@ -188,7 +188,7 @@ ccl_device_noinline bool indirect_lamp_emission(KernelGlobals *kg, PathState *st
|
|||
/* use visibility flag to skip lights */
|
||||
if(ls.shader & SHADER_EXCLUDE_ANY) {
|
||||
if(((ls.shader & SHADER_EXCLUDE_DIFFUSE) && (state->flag & PATH_RAY_DIFFUSE)) ||
|
||||
((ls.shader & SHADER_EXCLUDE_GLOSSY) && (state->flag & PATH_RAY_GLOSSY)) ||
|
||||
((ls.shader & SHADER_EXCLUDE_GLOSSY) && (state->flag & PATH_RAY_REFLECT)) ||
|
||||
((ls.shader & SHADER_EXCLUDE_TRANSMIT) && (state->flag & PATH_RAY_TRANSMIT)) ||
|
||||
((ls.shader & SHADER_EXCLUDE_SCATTER) && (state->flag & PATH_RAY_VOLUME_SCATTER)))
|
||||
continue;
|
||||
|
@ -232,7 +232,7 @@ ccl_device_noinline float3 indirect_background(KernelGlobals *kg, PathState *sta
|
|||
/* use visibility flag to skip lights */
|
||||
if(shader & SHADER_EXCLUDE_ANY) {
|
||||
if(((shader & SHADER_EXCLUDE_DIFFUSE) && (state->flag & PATH_RAY_DIFFUSE)) ||
|
||||
((shader & SHADER_EXCLUDE_GLOSSY) && (state->flag & PATH_RAY_GLOSSY)) ||
|
||||
((shader & SHADER_EXCLUDE_GLOSSY) && (state->flag & PATH_RAY_REFLECT)) ||
|
||||
((shader & SHADER_EXCLUDE_TRANSMIT) && (state->flag & PATH_RAY_TRANSMIT)) ||
|
||||
((shader & SHADER_EXCLUDE_CAMERA) && (state->flag & PATH_RAY_CAMERA)) ||
|
||||
((shader & SHADER_EXCLUDE_SCATTER) && (state->flag & PATH_RAY_VOLUME_SCATTER)))
|
||||
|
|
Loading…
Reference in New Issue