Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_shader.h
| Show First 20 Lines • Show All 1,274 Lines • ▼ Show 20 Lines | ccl_device_inline void shader_eval_volume(KernelGlobals *kg, | ||||
| /* reset closures once at the start, we will be accumulating the closures | /* reset closures once at the start, we will be accumulating the closures | ||||
| * for all volumes in the stack into a single array of closures */ | * for all volumes in the stack into a single array of closures */ | ||||
| sd->num_closure = 0; | sd->num_closure = 0; | ||||
| sd->num_closure_left = max_closures; | sd->num_closure_left = max_closures; | ||||
| sd->flag = 0; | sd->flag = 0; | ||||
| sd->object_flag = 0; | sd->object_flag = 0; | ||||
| for (int i = 0; stack[i].shader != SHADER_NONE; i++) { | for (int i = 0; stack[i].shader != SHADER_NONE; i++) { | ||||
| if (!stack[i].visible) { | |||||
| continue; | |||||
| } | |||||
| /* setup shaderdata from stack. it's mostly setup already in | /* setup shaderdata from stack. it's mostly setup already in | ||||
| * shader_setup_from_volume, this switching should be quick */ | * shader_setup_from_volume, this switching should be quick */ | ||||
| sd->object = stack[i].object; | sd->object = stack[i].object; | ||||
| sd->lamp = LAMP_NONE; | sd->lamp = LAMP_NONE; | ||||
| sd->shader = stack[i].shader; | sd->shader = stack[i].shader; | ||||
| sd->flag &= ~SD_SHADER_FLAGS; | sd->flag &= ~SD_SHADER_FLAGS; | ||||
| sd->flag |= kernel_tex_fetch(__shaders, (sd->shader & SHADER_MASK)).flags; | sd->flag |= kernel_tex_fetch(__shaders, (sd->shader & SHADER_MASK)).flags; | ||||
| ▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines | |||||