summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-02-26 16:38:50 +0000
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-02-26 16:38:50 +0000
commit6303ef5763393021d35c55a012cacfa7ee8c650e (patch)
tree01912486f86a81946bdb23ea07327804ee789056 /indra/llrender
parent6cc4a091b3ba4dd4842cc06e3b34af3d04dc5796 (diff)
Redo advanced atmo shader integration with SL.
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llatmosphere.cpp3
-rw-r--r--indra/llrender/llglslshader.cpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/indra/llrender/llatmosphere.cpp b/indra/llrender/llatmosphere.cpp
index fb159a3e47..8840f49454 100644
--- a/indra/llrender/llatmosphere.cpp
+++ b/indra/llrender/llatmosphere.cpp
@@ -167,18 +167,21 @@ LLAtmosphere::LLAtmosphere()
m_scattering = new LLGLTexture;
m_mie_scattering = new LLGLTexture;
+ m_transmittance->generateGLTexture();
m_transmittance->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP);
m_transmittance->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR);
m_transmittance->setExplicitFormat(GL_RGB16F, GL_RGB, GL_FLOAT);
m_transmittance->setTexName(m_textures.transmittance_texture);
m_transmittance->setTarget(GL_TEXTURE_2D, LLTexUnit::TT_TEXTURE);
+ m_scattering->generateGLTexture();
m_scattering->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP);
m_scattering->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR);
m_scattering->setExplicitFormat(GL_RGB16F, GL_RGB, GL_FLOAT);
m_scattering->setTexName(m_textures.transmittance_texture);
m_scattering->setTarget(GL_TEXTURE_3D, LLTexUnit::TT_TEXTURE_3D);
+ m_mie_scattering->generateGLTexture();
m_mie_scattering->setAddressMode(LLTexUnit::eTextureAddressMode::TAM_CLAMP);
m_mie_scattering->setFilteringOption(LLTexUnit::eTextureFilterOptions::TFO_BILINEAR);
m_mie_scattering->setExplicitFormat(GL_RGB16F, GL_RGB, GL_FLOAT);
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index b09ec53bc0..a5939a6eb9 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -374,6 +374,8 @@ void LLGLSLShader::unloadInternal()
stop_glerror();
}
+#pragma optimize("", off)
+
BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
std::vector<LLStaticHashedString> * uniforms,
U32 varying_count,
@@ -490,6 +492,8 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
return success;
}
+#pragma optimize("", on)
+
BOOL LLGLSLShader::attachObject(std::string object)
{
if (LLShaderMgr::instance()->mShaderObjects.count(object) > 0)