diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2021-10-21 18:46:31 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2021-10-21 18:46:31 -0700 |
commit | de3568f1fdab50b3bdbbb1a6b67d552c97c86464 (patch) | |
tree | c47c3bac007a2ef7419c37118afdfec1c7841678 /indra/newview | |
parent | de2c6826073ab1fbc83ac8a486157c177aa1f5dc (diff) |
SL-16127: Cleanup consts
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llvosky.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 882bfe6f7d..9b929cda8c 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -64,7 +64,9 @@ namespace const S32 NUM_TILES_X = 8; const S32 NUM_TILES_Y = 4; const S32 NUM_TILES = NUM_TILES_X * NUM_TILES_Y; - const S32 NUM_CUBEMAP_FACES = 6; + const S32 NUM_CUBEMAP_FACES = 6; // See sResolution for face dimensions + const S32 TOTAL_TILES = NUM_CUBEMAP_FACES * NUM_TILES; + const S32 MAX_TILES = TOTAL_TILES + 1; // Heavenly body constants const F32 SUN_DISK_RADIUS = 0.5f; @@ -690,15 +692,13 @@ bool LLVOSky::updateSky() } static S32 next_frame = 0; - const S32 total_no_tiles = NUM_CUBEMAP_FACES * NUM_TILES; - const S32 cycle_frame_no = total_no_tiles + 1; mNeedUpdate = mForceUpdate; ++next_frame; - next_frame = next_frame % cycle_frame_no; + next_frame = next_frame % MAX_TILES; - mInterpVal = (!mInitialized) ? 1 : (F32)next_frame / cycle_frame_no; + mInterpVal = (!mInitialized) ? 1 : (F32)next_frame / MAX_TILES; LLHeavenBody::setInterpVal( mInterpVal ); updateDirections(psky); |