commit 0b7802916e87eee88e6734594e9934d24e261c2f
parent 08d94d80ee0ac36195c553e622dea997a00c8a45
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 26 Jul 2018 10:04:36 +0200
Handle the "g" parameter of the sky in radiance_sw integrator
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/htrdr_compute_radiance_sw.c b/src/htrdr_compute_radiance_sw.c
@@ -280,6 +280,7 @@ htrdr_compute_radiance_sw
double sun_dir[3];
double ksi = 1; /* Throughput */
double w = 0; /* MC weight */
+ double g = 0; /* Asymmetry parameter of the HG phase function */
float ray_pos[3];
float ray_dir[3];
@@ -288,6 +289,11 @@ htrdr_compute_radiance_sw
ASSERT(wavelength >= SW_WAVELENGTH_MIN && wavelength <= SW_WAVELENGTH_MAX);
ASSERT(htrdr && rng && pos_in && dir_in);
+ /* Setup the phase function for this wavelength */
+ g = htrdr_sky_fetch_particle_phase_function_asymmetry_parameter
+ (htrdr->sky, wavelength);
+ SSF(phase_hg_setup(htrdr->phase_hg, g));
+
/* Fetch sun properties */
sun_solid_angle = htrdr_sun_get_solid_angle(htrdr->sun);
L_sun = htrdr_sun_get_radiance(htrdr->sun, wavelength);