Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_path_branched.h
| Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | ccl_device_forceinline void kernel_branched_path_volume(KernelGlobals *kg, | ||||
| ShaderData *emission_sd, | ShaderData *emission_sd, | ||||
| PathRadiance *L) | PathRadiance *L) | ||||
| { | { | ||||
| /* Sanitize volume stack. */ | /* Sanitize volume stack. */ | ||||
| if (!hit) { | if (!hit) { | ||||
| kernel_volume_clean_stack(kg, state->volume_stack); | kernel_volume_clean_stack(kg, state->volume_stack); | ||||
| } | } | ||||
| if (state->volume_stack[0].shader == SHADER_NONE) { | if (state->volume_stack[0].shader == SHADER_NONE) { | ||||
| return; | return; | ||||
| } | } | ||||
brecht: Should this test be removed now? | |||||
| if (!kernel_volume_stack_is_visible(kg, state->volume_stack, state->flag)) { | |||||
| return; | |||||
| } | |||||
| /* volume attenuation, emission, scatter */ | /* volume attenuation, emission, scatter */ | ||||
| Ray volume_ray = *ray; | Ray volume_ray = *ray; | ||||
| volume_ray.t = (hit) ? isect->t : FLT_MAX; | volume_ray.t = (hit) ? isect->t : FLT_MAX; | ||||
| float step_size = volume_stack_step_size(kg, state->volume_stack); | float step_size = volume_stack_step_size(kg, state->volume_stack); | ||||
| # ifdef __VOLUME_DECOUPLED__ | # ifdef __VOLUME_DECOUPLED__ | ||||
| /* decoupled ray marching only supported on CPU */ | /* decoupled ray marching only supported on CPU */ | ||||
| ▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines | |||||
Should this test be removed now?