Cycles: Fix regression caused by recent camera-in-volume commit

Stupid me forgot that we don't have stop-element in the stack yet.
This commit is contained in:
Sergey Sharybin 2016-04-04 18:24:40 +02:00
parent a3d6552514
commit ac8f4ba530
1 changed files with 1 additions and 1 deletions

View File

@ -1011,7 +1011,7 @@ ccl_device void kernel_volume_stack_init(KernelGlobals *kg,
shader_setup_from_ray(kg, &sd, isect, &volume_ray);
if(sd.flag & SD_BACKFACING) {
bool need_add = true;
for(int i = 0; stack[i].shader != SHADER_NONE; ++i) {
for(int i = 0; i < stack_index; ++i) {
/* If ray exited the volume and never entered to that volume
* it means that camera is inside such a volume.
*/