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:
Sergey Sharybin
2015-06-11 10:42:38 +02:00
parent 3438130a94
commit 2bd6de5bbb
10 changed files with 33 additions and 1 deletions

View File

@@ -477,6 +477,7 @@ ccl_device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample,
if(state.flag & PATH_RAY_CAMERA) {
debug_data.num_bvh_traversal_steps += isect.num_traversal_steps;
}
debug_data.num_ray_bounces++;
#endif
#ifdef __LAMP_MIS__
@@ -878,6 +879,7 @@ ccl_device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, in
if(state.flag & PATH_RAY_CAMERA) {
debug_data.num_bvh_traversal_steps += isect.num_traversal_steps;
}
debug_data.num_ray_bounces++;
#endif
#ifdef __VOLUME__