Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/integrator/shade_light.h
| Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | #endif | ||||
| } | } | ||||
| /* MIS weighting. */ | /* MIS weighting. */ | ||||
| float mis_weight = 1.0f; | float mis_weight = 1.0f; | ||||
| if (!(path_flag & PATH_RAY_MIS_SKIP)) { | if (!(path_flag & PATH_RAY_MIS_SKIP)) { | ||||
| /* multiple importance sampling, get regular light pdf, | /* multiple importance sampling, get regular light pdf, | ||||
| * and compute weight with respect to BSDF pdf */ | * and compute weight with respect to BSDF pdf */ | ||||
| const float mis_ray_pdf = INTEGRATOR_STATE(state, path, mis_ray_pdf); | const float mis_ray_pdf = INTEGRATOR_STATE(state, path, mis_ray_pdf); | ||||
| if (kernel_data.integrator.use_light_tree) { | |||||
| const float3 N = INTEGRATOR_STATE(state, path, mis_origin_n); | |||||
| ls.pdf *= light_tree_pdf(kg, state, ray_P, N, ~ls.lamp); | |||||
| } | |||||
| const float mis_weight = light_sample_mis_weight_forward(kg, mis_ray_pdf, ls.pdf); | const float mis_weight = light_sample_mis_weight_forward(kg, mis_ray_pdf, ls.pdf); | ||||
| light_eval *= mis_weight; | light_eval *= mis_weight; | ||||
Alaska: This is incorrect. However it was fixed with a recent commit in the Master branch of Blender. | |||||
| } | } | ||||
| /* Write to render buffer. */ | /* Write to render buffer. */ | ||||
| film_write_surface_emission(kg, state, light_eval, mis_weight, render_buffer, ls.group); | film_write_surface_emission(kg, state, light_eval, mis_weight, render_buffer, ls.group); | ||||
| } | } | ||||
| ccl_device void integrator_shade_light(KernelGlobals kg, | ccl_device void integrator_shade_light(KernelGlobals kg, | ||||
| IntegratorState state, | IntegratorState state, | ||||
| Show All 33 Lines | |||||
This is incorrect. However it was fixed with a recent commit in the Master branch of Blender.