Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/integrator/integrator_volume_stack.h
| Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | for (i = 0;; i++) { | ||||
| /* Already in the stack? then we have nothing to do. */ | /* Already in the stack? then we have nothing to do. */ | ||||
| if (entry.object == sd->object) { | if (entry.object == sd->object) { | ||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| /* If we exceed the stack limit, ignore. */ | /* If we exceed the stack limit, ignore. */ | ||||
| if (i >= VOLUME_STACK_SIZE - 1) { | if (i >= kernel_data.volume_stack_size - 1) { | ||||
| return; | return; | ||||
| } | } | ||||
| /* Add to the end of the stack. */ | /* Add to the end of the stack. */ | ||||
| const VolumeStack new_entry = {sd->object, sd->shader}; | const VolumeStack new_entry = {sd->object, sd->shader}; | ||||
| const VolumeStack empty_entry = {OBJECT_NONE, SHADER_NONE}; | const VolumeStack empty_entry = {OBJECT_NONE, SHADER_NONE}; | ||||
| stack_write(i, new_entry); | stack_write(i, new_entry); | ||||
| stack_write(i + 1, empty_entry); | stack_write(i + 1, empty_entry); | ||||
| ▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines | |||||