diff options
Diffstat (limited to 'indra/llrender/llatmosphere.h')
-rw-r--r-- | indra/llrender/llatmosphere.h | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/indra/llrender/llatmosphere.h b/indra/llrender/llatmosphere.h index 6a9d1a4438..0d62a069ac 100644 --- a/indra/llrender/llatmosphere.h +++ b/indra/llrender/llatmosphere.h @@ -31,6 +31,36 @@ #include "llgltexture.h" #include "libatmosphere/model.h" +typedef std::vector<atmosphere::DensityProfileLayer> DensityProfile; + +class AtmosphericModelSettings +{ +public: + AtmosphericModelSettings(); + + AtmosphericModelSettings( + DensityProfile& rayleighProfile, + DensityProfile& mieProfile, + DensityProfile& absorptionProfile); + + AtmosphericModelSettings( + F32 skyBottomRadius, + F32 skyTopRadius, + DensityProfile& rayleighProfile, + DensityProfile& mieProfile, + DensityProfile& absorptionProfile, + F32 sunArcRadians, + F32 mieAniso); + + F32 m_skyBottomRadius; + F32 m_skyTopRadius; + DensityProfile m_rayleighProfile; + DensityProfile m_mieProfile; + DensityProfile m_absorptionProfile; + F32 m_sunArcRadians; + F32 m_mieAnisotropy; +}; + class LLAtmosphere { public: @@ -46,12 +76,15 @@ public: return *this; } - LLGLTexture* getTransmittance() const; - LLGLTexture* getScattering() const; - LLGLTexture* getMieScattering() const; + LLGLTexture* getTransmittance(); + LLGLTexture* getScattering(); + LLGLTexture* getMieScattering(); + LLGLTexture* getIlluminance(); GLhandleARB getAtmosphericShaderForLink() const; + bool configureAtmosphericModel(AtmosphericModelSettings& settings); + protected: LLAtmosphere(const LLAtmosphere& rhs) { @@ -64,7 +97,16 @@ protected: LLPointer<LLGLTexture> m_transmittance; LLPointer<LLGLTexture> m_scattering; - LLPointer<LLGLTexture> m_mie_scattering; + LLPointer<LLGLTexture> m_mie_scatter_texture; + LLPointer<LLGLTexture> m_illuminance; + + std::vector<double> m_wavelengths; + std::vector<double> m_solar_irradiance; + std::vector<double> m_rayleigh_scattering; + std::vector<double> m_mie_scattering; + std::vector<double> m_mie_extinction; + std::vector<double> m_absorption_extinction; + std::vector<double> m_ground_albedo; }; extern LLAtmosphere* gAtmosphere; |