Merge branch 'blender-v4.4-release'
This commit is contained in:
@@ -1028,7 +1028,15 @@ bool OSLRenderServices::get_background_attribute(
|
||||
|
||||
if (name == u_path_ray_depth) {
|
||||
/* Ray Depth */
|
||||
const int f = READ_PATH_STATE(bounce);
|
||||
int f = READ_PATH_STATE(bounce);
|
||||
|
||||
/* Read bounce from different locations depending on if this is a shadow path. For background,
|
||||
* light emission and shadow evaluation from a surface or volume we are effectively one bounce
|
||||
* further. */
|
||||
if (globals->raytype & (PATH_RAY_SHADOW | PATH_RAY_EMISSION)) {
|
||||
f += 1;
|
||||
}
|
||||
|
||||
return set_attribute_int(f, type, derivatives, val);
|
||||
}
|
||||
if (name == u_path_diffuse_depth) {
|
||||
|
||||
@@ -1082,7 +1082,15 @@ ccl_device_inline bool get_background_attribute(KernelGlobals kg,
|
||||
|
||||
if (name == DeviceStrings::u_path_ray_depth) {
|
||||
/* Ray Depth */
|
||||
const int f = READ_PATH_STATE(bounce);
|
||||
int f = READ_PATH_STATE(bounce);
|
||||
|
||||
/* Read bounce from different locations depending on if this is a shadow path. For background,
|
||||
* light emission and shadow evaluation from a surface or volume we are effectively one bounce
|
||||
* further. */
|
||||
if (sg->raytype & (PATH_RAY_SHADOW | PATH_RAY_EMISSION)) {
|
||||
f += 1;
|
||||
}
|
||||
|
||||
return set_attribute_int(f, type, derivatives, val);
|
||||
}
|
||||
if (name == DeviceStrings::u_path_diffuse_depth) {
|
||||
|
||||
@@ -53,7 +53,7 @@ ccl_device_noinline void svm_node_light_path(KernelGlobals kg,
|
||||
info = sd->ray_length;
|
||||
break;
|
||||
case NODE_LP_ray_depth: {
|
||||
/* Read bounce from difference location depending if this is a shadow
|
||||
/* Read bounce from different locations depending on if this is a shadow
|
||||
* path. It's a bit dubious to have integrate state details leak into
|
||||
* this function but hard to avoid currently. */
|
||||
IF_KERNEL_NODES_FEATURE(LIGHT_PATH)
|
||||
|
||||
Reference in New Issue
Block a user