Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_path.h
| Show First 20 Lines • Show All 845 Lines • ▼ Show 20 Lines | #endif | ||||
| * shader evaluations, only need emission if we are going to terminate */ | * shader evaluations, only need emission if we are going to terminate */ | ||||
| float probability = path_state_terminate_probability(kg, &state, throughput); | float probability = path_state_terminate_probability(kg, &state, throughput); | ||||
| if(probability == 0.0f) { | if(probability == 0.0f) { | ||||
| break; | break; | ||||
| } | } | ||||
| else if(probability != 1.0f) { | else if(probability != 1.0f) { | ||||
| float terminate = path_state_rng_1D_for_decision(kg, rng, &state, PRNG_TERMINATE); | float terminate = path_state_rng_1D_for_decision(kg, rng, &state, PRNG_TERMINATE); | ||||
| if(terminate >= probability) | if(terminate >= probability) | ||||
| break; | break; | ||||
| throughput /= probability; | throughput /= probability; | ||||
| } | } | ||||
| #ifdef __AO__ | #ifdef __AO__ | ||||
| /* ambient occlusion */ | /* ambient occlusion */ | ||||
| ▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines | |||||