From a29807cd63b0cba62e664c54ce34e5717ca51a3e Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 4 Apr 2014 16:45:49 +0200 Subject: Cycles: volume light sampling * Volume multiple importace sampling support to combine equiangular and distance sampling, for both homogeneous and heterogeneous volumes. * Branched path "Sample All Direct Lights" and "Sample All Indirect Lights" now apply to volumes as well as surfaces. Implementation note: For simplicity this is all done with decoupled ray marching, the only case we do not use decoupled is for distance only sampling with one light sample. The homogeneous case should still compile on the GPU because it only requires fixed size storage, but the heterogeneous case will be trickier to get working. --- intern/cycles/kernel/kernel_shader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/cycles/kernel/kernel_shader.h') diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h index 0ea21a85fcb..842b9f68840 100644 --- a/intern/cycles/kernel/kernel_shader.h +++ b/intern/cycles/kernel/kernel_shader.h @@ -858,7 +858,7 @@ ccl_device_inline void _shader_volume_phase_multi_eval(const ShaderData *sd, con if(phase_pdf != 0.0f) { bsdf_eval_accum(result_eval, sc->type, eval); - sum_pdf += phase_pdf; + sum_pdf += phase_pdf*sc->sample_weight; } sum_sample_weight += sc->sample_weight; -- cgit v1.2.3