summaryrefslogtreecommitdiff
path: root/indra/newview/llvosky.cpp
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2021-10-21 18:40:24 -0700
committerPtolemy <ptolemy@lindenlab.com>2021-10-21 18:40:24 -0700
commit94d08a13d5737f072231584d9f135dc44e8c6750 (patch)
tree5523ec04f9df966c5b3dfdd0d262ba36c3065caa /indra/newview/llvosky.cpp
parentee724fecdc1c3285cfa1a260a2fdf8f2355a68fa (diff)
SL-16127: Use cached sky
Diffstat (limited to 'indra/newview/llvosky.cpp')
-rw-r--r--indra/newview/llvosky.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index cb2b2e8dfb..1fd10a231a 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -491,7 +491,7 @@ void LLVOSky::init()
for (S32 tile = 0; tile < NUM_TILES; ++tile)
{
initSkyTextureDirs(side, tile);
- createSkyTexture(m_atmosphericsVars, side, tile);
+ createSkyTexture(psky, m_atmosphericsVars, side, tile);
}
mSkyTex[side].create();
mShinyTex[side].create();
@@ -639,10 +639,8 @@ void LLVOSky::initSkyTextureDirs(const S32 side, const S32 tile)
}
}
-void LLVOSky::createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile)
+void LLVOSky::createSkyTexture(LLSettingsSky::ptr_t psky, AtmosphericsVars& vars, const S32 side, const S32 tile)
{
- LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
-
S32 tile_x = tile % NUM_TILES_X;
S32 tile_y = tile / NUM_TILES_X;
@@ -812,7 +810,7 @@ bool LLVOSky::updateSky()
// instead of executing per face, or may be can be moved to shaders)
for (S32 tile = 0; tile < NUM_TILES; tile++)
{
- createSkyTexture(m_atmosphericsVars, side, tile);
+ createSkyTexture(psky, m_atmosphericsVars, side, tile);
}
mCubeMapUpdateStage++;
}