Cycles: Avoid temp variable in camera-in-volume check

Was a left-over from some experiments, no need it with the current
implementation, and likely wouldn't need in the future.
This commit is contained in:
Sergey Sharybin
2014-09-28 02:35:37 +06:00
parent 53b05e4f06
commit 21825c4359
2 changed files with 4 additions and 5 deletions

View File

@@ -371,7 +371,7 @@ ccl_device void kernel_path_subsurface_update_volume_stack(KernelGlobals *kg,
Intersection isect; Intersection isect;
const float3 Pend = volume_ray.P + volume_ray.D*volume_ray.t; const float3 Pend = volume_ray.P + volume_ray.D*volume_ray.t;
while(scene_intersect(kg, &volume_ray, PATH_RAY_ALL_VISIBILITY while(scene_intersect(kg, &volume_ray, PATH_RAY_ALL_VISIBILITY,
&isect, NULL, 0.0f, 0.0f)) &isect, NULL, 0.0f, 0.0f))
{ {
ShaderData sd; ShaderData sd;

View File

@@ -985,10 +985,9 @@ ccl_device void kernel_volume_stack_init(KernelGlobals *kg,
enclosed_index < VOLUME_STACK_SIZE - 1) enclosed_index < VOLUME_STACK_SIZE - 1)
{ {
Intersection isect; Intersection isect;
bool hit = scene_intersect(kg, &volume_ray, PATH_RAY_ALL_VISIBILITY, if(!scene_intersect(kg, &volume_ray, PATH_RAY_ALL_VISIBILITY,
&isect, &isect, NULL, 0.0f, 0.0f))
NULL, 0.0f, 0.0f); {
if(!hit) {
break; break;
} }