Cycles: Add debug pass showing average number of ray bounces per pixel
Quite straightforward implementation, but still needs some work for the split kernel. Includes both regular and split kernel implementation for that. The pass is not exposed to the interface yet because it's currently not really easy to have same pass listed in the menu multiple times.
This commit is contained in:
@@ -19,6 +19,7 @@ CCL_NAMESPACE_BEGIN
|
||||
ccl_device_inline void debug_data_init(DebugData *debug_data)
|
||||
{
|
||||
debug_data->num_bvh_traversal_steps = 0;
|
||||
debug_data->num_ray_bounces = 0;
|
||||
}
|
||||
|
||||
ccl_device_inline void kernel_write_debug_passes(KernelGlobals *kg,
|
||||
@@ -33,6 +34,11 @@ ccl_device_inline void kernel_write_debug_passes(KernelGlobals *kg,
|
||||
sample,
|
||||
debug_data->num_bvh_traversal_steps);
|
||||
}
|
||||
if(flag & PASS_RAY_BOUNCES) {
|
||||
kernel_write_pass_float(buffer + kernel_data.film.pass_ray_bounces,
|
||||
sample,
|
||||
debug_data->num_ray_bounces);
|
||||
}
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user