diff options
author | Euclid Linden <euclid@lindenlab.com> | 2022-05-27 21:15:49 +0000 |
---|---|---|
committer | Euclid Linden <euclid@lindenlab.com> | 2022-05-27 21:15:49 +0000 |
commit | 3f98411c56f4daa06c9102346a8dd37af18d2cb6 (patch) | |
tree | 4255c2827cc3e07921275bfd7937f4f43f29d5fa /indra/newview/llvosky.h | |
parent | 3f58ec2fdfb76ce2160884a3e97be49f60b6ac90 (diff) | |
parent | 02c71b0ac2f99dd1c26a649ffce2182b2fc9a7d9 (diff) |
Merged in DV528-merge-6.6.1 (pull request #1000)
DRTVWR-528 merge up to 6.6.1
Diffstat (limited to 'indra/newview/llvosky.h')
-rw-r--r-- | indra/newview/llvosky.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 39e42bbb24..5941ab6e3b 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -43,6 +43,9 @@ const F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 20.f; const F32 HEAVENLY_BODY_FACTOR = 0.1f; const F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR; +const F32 SKYTEX_COMPONENTS = 4; +const F32 SKYTEX_RESOLUTION = 64; + class LLFace; class LLHaze; @@ -50,8 +53,6 @@ class LLSkyTex { friend class LLVOSky; private: - static S32 sResolution; - static S32 sComponents; LLPointer<LLViewerTexture> mTexture[2]; LLPointer<LLImageRaw> mImageRaw[2]; LLColor4 *mSkyData; @@ -82,25 +83,25 @@ protected: void setDir(const LLVector3 &dir, const S32 i, const S32 j) { - S32 offset = i * sResolution + j; + S32 offset = i * SKYTEX_RESOLUTION + j; mSkyDirs[offset] = dir; } const LLVector3 &getDir(const S32 i, const S32 j) const { - S32 offset = i * sResolution + j; + S32 offset = i * SKYTEX_RESOLUTION + j; return mSkyDirs[offset]; } void setPixel(const LLColor4 &col, const S32 i, const S32 j) { - S32 offset = i * sResolution + j; + S32 offset = i * SKYTEX_RESOLUTION + j; mSkyData[offset] = col; } void setPixel(const LLColor4U &col, const S32 i, const S32 j) { - S32 offset = (i * sResolution + j) * sComponents; + S32 offset = (i * SKYTEX_RESOLUTION + j) * SKYTEX_COMPONENTS; U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]); *pix = col.asRGBA(); } @@ -108,7 +109,7 @@ protected: LLColor4U getPixel(const S32 i, const S32 j) { LLColor4U col; - S32 offset = (i * sResolution + j) * sComponents; + S32 offset = (i * SKYTEX_RESOLUTION + j) * SKYTEX_COMPONENTS; U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]); col.fromRGBA( *pix ); return col; @@ -214,12 +215,12 @@ public: // Initialize/delete data that's only inited once per class. void init(); void initCubeMap(); - void initEmpty(); void cleanupGL(); void restoreGL(); void calc(); + void cacheEnvironment(LLSettingsSky::ptr_t psky, AtmosphericsVars& atmosphericsVars); /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); bool updateSky(); @@ -253,8 +254,6 @@ public: LLColor4 getSkyFogColor() const { return m_legacyAtmospherics.getFogColor(); } LLColor4 getGLFogColor() const { return m_legacyAtmospherics.getGLFogColor(); } - LLColor4U getFadeColor() const; - void setCloudDensity(F32 cloud_density) { mCloudDensity = cloud_density; } void setWind ( const LLVector3& wind ) { mWind = wind.length(); } @@ -299,10 +298,10 @@ public: protected: ~LLVOSky(); - void updateDirections(void); + void updateDirections(LLSettingsSky::ptr_t psky); void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile); + void createSkyTexture(const LLSettingsSky::ptr_t &psky, AtmosphericsVars& vars, const S32 side, const S32 tile); LLPointer<LLViewerFetchedTexture> mSunTexturep[2]; LLPointer<LLViewerFetchedTexture> mMoonTexturep[2]; |