2#include "../framework/constants.h"
4using physical_constants::atmospheric_pressure_at_sea_level;
57 double cosine_zenith_angle,
58 double atmospheric_pressure,
59 double atmospheric_transmittance,
60 double atmospheric_scattering
64 double const pressure_ratio =
65 atmospheric_pressure / atmospheric_pressure_at_sea_level;
71 double const direct_transmittance =
72 cosine_zenith_angle <= 0 ? 0
73 : pow(atmospheric_transmittance,
74 (pressure_ratio / cosine_zenith_angle));
80 double const diffuse_transmittance =
81 cosine_zenith_angle <= 0 ? 0
82 : atmospheric_scattering *
83 (1 - direct_transmittance) *
90 double const direct_fraction =
91 cosine_zenith_angle <= 0 ? 0
92 : direct_transmittance /
93 (direct_transmittance + diffuse_transmittance);
96 double const diffuse_fraction = 1.0 - direct_fraction;
100 diffuse_transmittance,
Light_model lightME(double cosine_zenith_angle, double atmospheric_pressure, double atmospheric_transmittance, double atmospheric_scattering)
Calculates the "light macro environment"; in other words, the amount of sunlight scattered out of the...