Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_path.h
| Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | # ifdef __VOLUME_DECOUPLED__ | ||||
| &throughput, | &throughput, | ||||
| rphase, | rphase, | ||||
| rscatter, | rscatter, | ||||
| &volume_segment, | &volume_segment, | ||||
| NULL, | NULL, | ||||
| true); | true); | ||||
| } | } | ||||
| /* free cached steps */ | |||||
| kernel_volume_decoupled_free(kg, &volume_segment); | |||||
| if(result == VOLUME_PATH_SCATTERED) { | if(result == VOLUME_PATH_SCATTERED) { | ||||
| if(kernel_path_volume_bounce(kg, | if(kernel_path_volume_bounce(kg, | ||||
| rng, | rng, | ||||
| &volume_sd, | &volume_sd, | ||||
| &throughput, | &throughput, | ||||
| state, | state, | ||||
| L, | L, | ||||
| ray)) | ray)) | ||||
| ▲ Show 20 Lines • Show All 531 Lines • ▼ Show 20 Lines | # ifdef __VOLUME_DECOUPLED__ | ||||
| float rphase = path_state_rng_1D_for_decision(kg, rng, &state, PRNG_PHASE); | float rphase = path_state_rng_1D_for_decision(kg, rng, &state, PRNG_PHASE); | ||||
| float rscatter = path_state_rng_1D_for_decision(kg, rng, &state, PRNG_SCATTER_DISTANCE); | float rscatter = path_state_rng_1D_for_decision(kg, rng, &state, PRNG_SCATTER_DISTANCE); | ||||
| result = kernel_volume_decoupled_scatter(kg, | result = kernel_volume_decoupled_scatter(kg, | ||||
| &state, &volume_ray, &volume_sd, &throughput, | &state, &volume_ray, &volume_sd, &throughput, | ||||
| rphase, rscatter, &volume_segment, NULL, true); | rphase, rscatter, &volume_segment, NULL, true); | ||||
| } | } | ||||
| /* free cached steps */ | |||||
| kernel_volume_decoupled_free(kg, &volume_segment); | |||||
| if(result == VOLUME_PATH_SCATTERED) { | if(result == VOLUME_PATH_SCATTERED) { | ||||
| if(kernel_path_volume_bounce(kg, rng, &volume_sd, &throughput, &state, &L, &ray)) | if(kernel_path_volume_bounce(kg, rng, &volume_sd, &throughput, &state, &L, &ray)) | ||||
| continue; | continue; | ||||
| else | else | ||||
| break; | break; | ||||
| } | } | ||||
| else { | else { | ||||
| throughput *= volume_segment.accum_transmittance; | throughput *= volume_segment.accum_transmittance; | ||||
| ▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines | |||||