commit 83671d411c30cef80b5b74512ffee22159b73440
parent 82b96559fd42a829dcf533ed97ed3789381b83cd
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 18 Oct 2018 11:08:13 +0200
Fix the surface scattering
Handle the missing cosine term between the incident sun direction and
the surface normal.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/htrdr_compute_radiance_sw.c b/src/htrdr_compute_radiance_sw.c
@@ -395,7 +395,7 @@ htrdr_compute_radiance_sw
if(d3_dot(N, sun_dir) < 0) { /* Below the ground */
R = 0;
} else {
- R = ssf_bsdf_eval(bsdf, wo, N, sun_dir);
+ R = ssf_bsdf_eval(bsdf, wo, N, sun_dir) * d3_dot(N, sun_dir);
}
/* Scattering in the medium */