diff options
author | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-05-01 00:10:11 +0100 |
---|---|---|
committer | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-05-01 00:10:11 +0100 |
commit | 3116416fcb8dfd54ef2807e9e75959429c946d79 (patch) | |
tree | 5fe7a724ac283796faff1e8bfdc2602238047deb /indra/llrender/llatmosphere.cpp | |
parent | 21ddbd64af44672e4b20dc4cdf99fd1fbc5c07c2 (diff) |
Le Merge
Diffstat (limited to 'indra/llrender/llatmosphere.cpp')
-rw-r--r-- | indra/llrender/llatmosphere.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llrender/llatmosphere.cpp b/indra/llrender/llatmosphere.cpp index 29a5d4be08..644e102a15 100644 --- a/indra/llrender/llatmosphere.cpp +++ b/indra/llrender/llatmosphere.cpp @@ -201,9 +201,11 @@ bool LLAtmosphere::configureAtmosphericModel(AtmosphericModelSettings& settings) delete m_model; } m_model = nullptr; + getTransmittance()->setTexName(0); getScattering()->setTexName(0); getMieScattering()->setTexName(0); + getIlluminance()->setTexName(0); // Init libatmosphere model m_config.num_scattering_orders = 4; @@ -235,6 +237,7 @@ bool LLAtmosphere::configureAtmosphericModel(AtmosphericModelSettings& settings) getTransmittance()->setTexName(m_textures.transmittance_texture); getScattering()->setTexName(m_textures.scattering_texture); getMieScattering()->setTexName(m_textures.single_mie_scattering_texture); + getIlluminance()->setTexName(m_textures.illuminance_texture); } return m_model != nullptr; @@ -282,6 +285,20 @@ LLGLTexture* LLAtmosphere::getMieScattering() return m_mie_scatter_texture; } +LLGLTexture* LLAtmosphere::getIlluminance() +{ + if (!m_illuminance) + { + m_illuminance = new LLGLTexture; + m_illuminance->generateGLTexture(); + m_illuminance->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP); + m_illuminance->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR); + m_illuminance->setExplicitFormat(GL_RGB16F_ARB, GL_RGB, GL_FLOAT); + m_illuminance->setTarget(GL_TEXTURE_2D, LLTexUnit::TT_TEXTURE); + } + return m_illuminance; +} + GLhandleARB LLAtmosphere::getAtmosphericShaderForLink() const { return m_model ? m_model->GetShader() : 0; |