Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_path_state.h
| Show All 17 Lines | |||||
| ccl_device_inline void path_state_init(KernelGlobals *kg, | ccl_device_inline void path_state_init(KernelGlobals *kg, | ||||
| ShaderData *stack_sd, | ShaderData *stack_sd, | ||||
| ccl_addr_space PathState *state, | ccl_addr_space PathState *state, | ||||
| RNG *rng, | RNG *rng, | ||||
| int sample, | int sample, | ||||
| ccl_addr_space Ray *ray) | ccl_addr_space Ray *ray) | ||||
| { | { | ||||
| state->flag = PATH_RAY_CAMERA|PATH_RAY_MIS_SKIP; | state->flag = PATH_RAY_CAMERA|PATH_RAY_MIS_SKIP|PATH_RAY_STORE_SHADOW_INFO; | ||||
brecht: If we only need this for shadow catch and denoising, might be good to only set this flag when… | |||||
| state->rng_offset = PRNG_BASE_NUM; | state->rng_offset = PRNG_BASE_NUM; | ||||
| state->sample = sample; | state->sample = sample; | ||||
| state->num_samples = kernel_data.integrator.aa_samples; | state->num_samples = kernel_data.integrator.aa_samples; | ||||
| state->bounce = 0; | state->bounce = 0; | ||||
| state->diffuse_bounce = 0; | state->diffuse_bounce = 0; | ||||
| state->glossy_bounce = 0; | state->glossy_bounce = 0; | ||||
| state->transmission_bounce = 0; | state->transmission_bounce = 0; | ||||
| state->transparent_bounce = 0; | state->transparent_bounce = 0; | ||||
| #ifdef __DENOISING_FEATURES__ | |||||
| state->denoising_feature_weight = (kernel_data.film.pass_denoising_data)? 1.0f : 0.0f; | |||||
| #endif /* __DENOISING_FEATURES__ */ | |||||
| state->min_ray_pdf = FLT_MAX; | state->min_ray_pdf = FLT_MAX; | ||||
| state->ray_pdf = 0.0f; | state->ray_pdf = 0.0f; | ||||
| #ifdef __LAMP_MIS__ | #ifdef __LAMP_MIS__ | ||||
| state->ray_t = 0.0f; | state->ray_t = 0.0f; | ||||
| #endif | #endif | ||||
| #ifdef __VOLUME__ | #ifdef __VOLUME__ | ||||
| state->volume_bounce = 0; | state->volume_bounce = 0; | ||||
| ▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines | |||||
If we only need this for shadow catch and denoising, might be good to only set this flag when one of those is in use?