Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_path_state.h
| Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | ccl_device_inline bool path_state_volume_next(KernelGlobals *kg, ccl_addr_space PathState *state) | ||||
| if (state->volume_bounds_bounce > 1) { | if (state->volume_bounds_bounce > 1) { | ||||
| state->rng_offset += PRNG_BOUNCE_NUM; | state->rng_offset += PRNG_BOUNCE_NUM; | ||||
| } | } | ||||
| return true; | return true; | ||||
| } | } | ||||
| #endif | #endif | ||||
| ccl_device_inline uint path_state_ray_visibility(KernelGlobals *kg, | ccl_device_inline uint path_state_ray_visibility(KernelGlobals *kg, uint state_flag) | ||||
| ccl_addr_space PathState *state) | |||||
| { | { | ||||
| uint flag = state->flag & PATH_RAY_ALL_VISIBILITY; | uint flag = state_flag & PATH_RAY_ALL_VISIBILITY; | ||||
| /* for visibility, diffuse/glossy are for reflection only */ | /* for visibility, diffuse/glossy are for reflection only */ | ||||
| if (flag & PATH_RAY_TRANSMIT) | if (flag & PATH_RAY_TRANSMIT) | ||||
| flag &= ~(PATH_RAY_DIFFUSE | PATH_RAY_GLOSSY); | flag &= ~(PATH_RAY_DIFFUSE | PATH_RAY_GLOSSY); | ||||
| /* todo: this is not supported as its own ray visibility yet */ | /* todo: this is not supported as its own ray visibility yet */ | ||||
| if (state->flag & PATH_RAY_VOLUME_SCATTER) | if (state_flag & PATH_RAY_VOLUME_SCATTER) | ||||
| flag |= PATH_RAY_DIFFUSE; | flag |= PATH_RAY_DIFFUSE; | ||||
| return flag; | return flag; | ||||
| } | } | ||||
| ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg, | ccl_device_inline float path_state_continuation_probability(KernelGlobals *kg, | ||||
| ccl_addr_space PathState *state, | ccl_addr_space PathState *state, | ||||
| const float3 throughput) | const float3 throughput) | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||