star-sf

Set of surface and volume scattering functions
git clone git://git.meso-star.fr/star-sf.git
Log | Files | Refs | README | LICENSE

commit b1747b1fb88ed763da93dde722b0b046e7575e4e
parent 8ce539a4586708eceb22dcd07b03436ea8778aa3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Mon, 19 Sep 2016 14:29:45 +0200

Fix the ssf_bsdf_view_create function

The probality of the first BSDF component was incorrect.

Diffstat:
Msrc/ssf_bsdf_view.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ssf_bsdf_view.c b/src/ssf_bsdf_view.c @@ -92,7 +92,7 @@ ssf_bsdf_view_create(struct ssf_bsdf* bsdf, struct ssf_bsdf_view** out_view) } /* Compute the probabilities of the components and the cumulative */ - view->probas[0] = bsdf->weights[i] / weights_sum; + view->probas[0] = bsdf->weights[0] / weights_sum; view->cumulative[0] = view->probas[0]; FOR_EACH(i, 1, view->ncomponents) { view->probas[i] = bsdf->weights[i] / weights_sum;