Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_volume.h
| Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | ccl_device void kernel_volume_shadow_heterogeneous(KernelGlobals *kg, PathState *state, Ray *ray, ShaderData *sd, float3 *throughput) | ||||
| *throughput = tp; | *throughput = tp; | ||||
| } | } | ||||
| /* get the volume attenuation over line segment defined by ray, with the | /* get the volume attenuation over line segment defined by ray, with the | ||||
| * assumption that there are no surfaces blocking light between the endpoints */ | * assumption that there are no surfaces blocking light between the endpoints */ | ||||
| ccl_device_noinline void kernel_volume_shadow(KernelGlobals *kg, PathState *state, Ray *ray, float3 *throughput) | ccl_device_noinline void kernel_volume_shadow(KernelGlobals *kg, PathState *state, Ray *ray, float3 *throughput) | ||||
| { | { | ||||
| ShaderData sd; | ShaderData sd; | ||||
| ShaderClosure sd_closure[MAX_SHADOW_CLOSURE]; | |||||
| sd.closure = sd_closure; | |||||
| sd.max_closure = MAX_SHADOW_CLOSURE; | |||||
| shader_setup_from_volume(kg, &sd, ray); | shader_setup_from_volume(kg, &sd, ray); | ||||
| if(volume_stack_is_heterogeneous(kg, state->volume_stack)) | if(volume_stack_is_heterogeneous(kg, state->volume_stack)) | ||||
| kernel_volume_shadow_heterogeneous(kg, state, ray, &sd, throughput); | kernel_volume_shadow_heterogeneous(kg, state, ray, &sd, throughput); | ||||
| else | else | ||||
| kernel_volume_shadow_homogeneous(kg, state, ray, &sd, throughput); | kernel_volume_shadow_homogeneous(kg, state, ray, &sd, throughput); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,008 Lines • Show Last 20 Lines | |||||