solstice-solver

Solver library of the solstice app
git clone git://git.meso-star.com/solstice-solver.git
Log | Files | Refs | README | LICENSE

commit fe3e818c510d064e9ad05b7fe874a2d96b900384
parent d0ca1b8cda44b4db1caef59b0364225d080a064b
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri, 24 Mar 2017 13:08:07 +0100

Merge branch 'develop' of gitlab.com:meso-star/solstice-solver into develop

Diffstat:
Msrc/ssol_draw_pt.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/ssol_draw_pt.c b/src/ssol_draw_pt.c @@ -104,7 +104,12 @@ sun_lighting ASSERT(sun && view && ray_data && bsdf && wo && N && ray_org); ASSERT(d3_dot(wo, N) >= 0); /* Assume that wo point outward the surface */ + /* Ensure that the incoming direction point outward the surface */ d3_minus(wi, sun->direction); + + /* The point look backward the sun */ + if(d3_dot(wi, N) < 0) return 0.0; + R = ssf_bsdf_eval(bsdf, wo, N, wi); if(R <= 0) return 0.0;