Cycles: code refactoring to deduplicate the various BVH traversal variations.
Now there is a single BVH traversal code with #ifdefs for various features. At runtime it will then select the appropriate variation to use depending if instancing, hair or motion blur is in use. This makes scenes without hair render a bit faster, especially after the minimum width feature was added. It's not the most beautiful code, but we can't use c++ templates and there were already 4 copies, adding 4 more to handle the hair case separately would be too much.
This commit is contained in:
@@ -210,7 +210,7 @@ __device void subsurface_scatter_step(KernelGlobals *kg, ShaderData *sd, int sta
|
||||
/* intersect with the same object. if multiple intersections are
|
||||
* found it will randomly pick one of them */
|
||||
Intersection isect;
|
||||
if(scene_intersect_subsurface(kg, &ray, &isect, sd->object, u6) == 0)
|
||||
if(!scene_intersect_subsurface(kg, &ray, &isect, sd->object, u6))
|
||||
continue;
|
||||
|
||||
/* setup new shading point */
|
||||
|
Reference in New Issue
Block a user