From 52b0d4173cec0f643f37d426aef8f5ab1fdf3232 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 27 Sep 2017 09:36:26 -0700 Subject: No longer 'goth windlight only', sky parameters passed from settings object. --- indra/newview/llvosky.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 9cfb9773bd..c865e8701c 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -33,6 +33,7 @@ #include "llviewertexture.h" #include "llviewerobject.h" #include "llframetimer.h" +#include "v3colorutil.h" ////////////////////////////////// @@ -85,26 +86,6 @@ BOOL clip_quad_to_horizon(F32& t_left, F32& t_right, LLVector3 v_clipped[4], const LLVector3 v_corner[4], const F32 cos_max_angle); F32 clip_side_to_horizon(const LLVector3& v0, const LLVector3& v1, const F32 cos_max_angle); -inline F32 color_intens ( const LLColor3 &col ) -{ - return col.mV[0] + col.mV[1] + col.mV[2]; -} - -inline F32 color_max(const LLColor3 &col) -{ - return llmax(col.mV[0], col.mV[1], col.mV[2]); -} - -inline F32 color_max(const LLColor4 &col) -{ - return llmax(col.mV[0], col.mV[1], col.mV[2]); -} - - -inline F32 color_min(const LLColor3 &col) -{ - return llmin(col.mV[0], col.mV[1], col.mV[2]); -} class LLFace; class LLHaze; -- cgit v1.2.3 From 23916be3dac32beebb17e0b9336b34176265783d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 29 Sep 2017 16:46:39 -0700 Subject: Moon is showing, sun still not working. --- indra/newview/llvosky.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index c865e8701c..32b5a7eba8 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -381,25 +381,25 @@ class LLVOSky : public LLStaticViewerObject { public: /// WL PARAMS - F32 dome_radius; - F32 dome_offset_ratio; - LLColor3 sunlight_color; - LLColor3 ambient; - F32 gamma; +// F32 dome_radius; +// F32 dome_offset_ratio; +// LLColor3 sunlight_color; +// LLColor3 ambient; +// F32 gamma; LLVector4 lightnorm; LLVector4 unclamped_lightnorm; - LLColor3 blue_density; - LLColor3 blue_horizon; - F32 haze_density; - F32 haze_horizon; - F32 density_multiplier; - F32 max_y; - LLColor3 glow; - F32 cloud_shadow; - LLColor3 cloud_color; - F32 cloud_scale; - LLColor3 cloud_pos_density1; - LLColor3 cloud_pos_density2; +// LLColor3 blue_density; +// LLColor3 blue_horizon; +// F32 haze_density; +// F32 haze_horizon; +// F32 density_multiplier; +// F32 max_y; +// LLColor3 glow; +// F32 cloud_shadow; +// LLColor3 cloud_color; +// F32 cloud_scale; +// LLColor3 cloud_pos_density1; +// LLColor3 cloud_pos_density2; public: void initAtmospherics(void); -- cgit v1.2.3 From e4b035d0cd3eaa76fd82643c17e3631c67387a54 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 5 Oct 2017 15:40:48 -0700 Subject: Skys settings object active. --- indra/newview/llvosky.h | 49 +++++++++++++------------------------------------ 1 file changed, 13 insertions(+), 36 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 32b5a7eba8..fe2d85df02 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -379,30 +379,8 @@ class LLCubeMap; class LLVOSky : public LLStaticViewerObject { -public: - /// WL PARAMS -// F32 dome_radius; -// F32 dome_offset_ratio; -// LLColor3 sunlight_color; -// LLColor3 ambient; -// F32 gamma; - LLVector4 lightnorm; - LLVector4 unclamped_lightnorm; -// LLColor3 blue_density; -// LLColor3 blue_horizon; -// F32 haze_density; -// F32 haze_horizon; -// F32 density_multiplier; -// F32 max_y; -// LLColor3 glow; -// F32 cloud_shadow; -// LLColor3 cloud_color; -// F32 cloud_scale; -// LLColor3 cloud_pos_density1; -// LLColor3 cloud_pos_density2; public: - void initAtmospherics(void); void calcAtmospherics(void); LLColor3 createDiffuseFromWL(LLColor3 diffuse, LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); LLColor3 createAmbientFromWL(LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); @@ -470,13 +448,12 @@ public: const LLVector3& getToMoon() const { return mMoon.getDirection(); } const LLVector3& getToMoonLast() const { return mMoon.getDirectionCached(); } BOOL isSunUp() const { return mSun.getDirectionCached().mV[2] > -0.05f; } - void calculateColors(); - LLColor3 getSunDiffuseColor() const { return mSunDiffuse; } - LLColor3 getMoonDiffuseColor() const { return mMoonDiffuse; } - LLColor4 getSunAmbientColor() const { return mSunAmbient; } - LLColor4 getMoonAmbientColor() const { return mMoonAmbient; } - const LLColor4& getTotalAmbientColor() const { return mTotalAmbient; } + LLColor3 getSunDiffuseColor() const; + LLColor3 getMoonDiffuseColor() const; + LLColor4 getSunAmbientColor() const; + LLColor4 getMoonAmbientColor() const; + LLColor4 getTotalAmbientColor() const; LLColor4 getFogColor() const { return mFogColor; } LLColor4 getGLFogColor() const { return mGLFogCol; } @@ -508,8 +485,8 @@ public: void setWorldScale(const F32 s) { mWorldScale = s; } void updateFog(const F32 distance); void setFogRatio(const F32 fog_ratio) { mFogRatio = fog_ratio; } - LLColor4U getFadeColor() const { return mFadeColor; } - F32 getFogRatio() const { return mFogRatio; } + LLColor4U getFadeColor() const; + F32 getFogRatio() const { return mFogRatio; } void setCloudDensity(F32 cloud_density) { mCloudDensity = cloud_density; } void setWind ( const LLVector3& wind ) { mWind = wind.length(); } @@ -576,12 +553,12 @@ protected: F32 mFogRatio; F32 mWorldScale; - LLColor4 mSunAmbient; - LLColor4 mMoonAmbient; - LLColor4 mTotalAmbient; - LLColor3 mSunDiffuse; - LLColor3 mMoonDiffuse; - LLColor4U mFadeColor; // Color to fade in from +// LLColor4 mSunAmbient; +// LLColor4 mMoonAmbient; +// LLColor4 mTotalAmbient; +// LLColor3 mSunDiffuse; +// LLColor3 mMoonDiffuse; +// LLColor4U mFadeColor; // Color to fade in from LLPointer mCubeMap; // Cube map for the environment S32 mDrawRefl; -- cgit v1.2.3 From 35873f5963791af08a9951624dc96481a71fa1d7 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 13 Nov 2017 16:43:47 -0800 Subject: Clean up on sun and moon --- indra/newview/llvosky.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index fe2d85df02..9123381c3d 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -461,7 +461,7 @@ public: void initSunDirection(const LLVector3 &sun_dir, const LLVector3 &sun_ang_velocity); - void setSunDirection(const LLVector3 &sun_dir, const LLVector3 &sun_ang_velocity); + void setSunDirection(const LLVector3 &sun_dir, const LLVector3 &moon_dir); BOOL updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 side, const BOOL is_sun, LLHeavenBody& hb, const F32 sin_max_angle, @@ -553,13 +553,6 @@ protected: F32 mFogRatio; F32 mWorldScale; -// LLColor4 mSunAmbient; -// LLColor4 mMoonAmbient; -// LLColor4 mTotalAmbient; -// LLColor3 mSunDiffuse; -// LLColor3 mMoonDiffuse; -// LLColor4U mFadeColor; // Color to fade in from - LLPointer mCubeMap; // Cube map for the environment S32 mDrawRefl; -- cgit v1.2.3 From 72270213f5eebd019b10bdd6ec15020ba3d2ecf5 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Wed, 28 Feb 2018 21:46:30 +0000 Subject: Add 3p package for adv atmospherics to autobuild. Mark legacy atmospherics code with ifdefs. Fix up legacy uplift to include new atmospherics settings. --- indra/newview/llvosky.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 9123381c3d..4f6bc55bbe 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -34,7 +34,7 @@ #include "llviewerobject.h" #include "llframetimer.h" #include "v3colorutil.h" - +#include "llsettingssky.h" ////////////////////////////////// // @@ -382,6 +382,8 @@ class LLVOSky : public LLStaticViewerObject public: void calcAtmospherics(void); + +#if SUPPORT_LEGACY_ATMOSPHERICS LLColor3 createDiffuseFromWL(LLColor3 diffuse, LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); LLColor3 createAmbientFromWL(LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); @@ -392,8 +394,17 @@ public: LLColor3 calcSkyColorWLFrag(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLColor3 & vary_CloudColorSun, LLColor3 & vary_CloudColorAmbient, F32 & vary_CloudDensity, LLVector2 vary_HorizontalProjection[2]); + LLColor4 calcSkyColorInDir(const LLVector3& dir, bool isShiny = false); + + LLColor3 calcRadianceAtPoint(const LLVector3& pos) const + { + F32 radiance = mBrightnessScaleGuess * mSun.getIntensity(); + return LLColor3(radiance, radiance, radiance); + } + void initSkyTextureDirs(const S32 side, const S32 tile); + void createSkyTexture(const S32 side, const S32 tile); +#endif -public: enum { FACE_SIDE0, @@ -429,17 +440,6 @@ public: /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); - void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(const S32 side, const S32 tile); - - LLColor4 calcSkyColorInDir(const LLVector3& dir, bool isShiny = false); - - LLColor3 calcRadianceAtPoint(const LLVector3& pos) const - { - F32 radiance = mBrightnessScaleGuess * mSun.getIntensity(); - return LLColor3(radiance, radiance, radiance); - } - const LLHeavenBody& getSun() const { return mSun; } const LLHeavenBody& getMoon() const { return mMoon; } -- cgit v1.2.3 From acdead96cd194040f586c5a6e976beca7bb999c4 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Fri, 2 Mar 2018 23:29:28 +0000 Subject: Replace ifdefs with comments marking legacy atmo params. --- indra/newview/llvosky.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 4f6bc55bbe..2c253aed51 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -383,7 +383,7 @@ class LLVOSky : public LLStaticViewerObject public: void calcAtmospherics(void); -#if SUPPORT_LEGACY_ATMOSPHERICS +// LEGACY_ATMOSPHERICS LLColor3 createDiffuseFromWL(LLColor3 diffuse, LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); LLColor3 createAmbientFromWL(LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); @@ -403,7 +403,6 @@ public: } void initSkyTextureDirs(const S32 side, const S32 tile); void createSkyTexture(const S32 side, const S32 tile); -#endif enum { -- cgit v1.2.3 From 62a0d579b5eb23ea306ade07afba76f7cba685c7 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Wed, 7 Mar 2018 18:37:09 +0000 Subject: Move legacy atmospherics code outside of llvosky (begin teasing apart). --- indra/newview/llvosky.h | 236 +++--------------------------------------------- 1 file changed, 15 insertions(+), 221 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 2c253aed51..e4d99a5e8b 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -35,36 +35,12 @@ #include "llframetimer.h" #include "v3colorutil.h" #include "llsettingssky.h" +#include "lllegacyatmospherics.h" -////////////////////////////////// -// -// Lots of constants -// -// Will clean these up at some point... -// - -const F32 HORIZON_DIST = 1024.0f; const F32 SKY_BOX_MULT = 16.0f; -const F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 10.f; +const F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 10.f; const F32 HEAVENLY_BODY_FACTOR = 0.1f; const F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR; -const F32 EARTH_RADIUS = 6.4e6f; // exact radius = 6.37 x 10^6 m -const F32 ATM_EXP_FALLOFF = 0.000126f; -const F32 ATM_SEA_LEVEL_NDENS = 2.55e25f; -// Somewhat arbitrary: -const F32 ATM_HEIGHT = 100000.f; - -const F32 FIRST_STEP = 5000.f; -const F32 INV_FIRST_STEP = 1.f/FIRST_STEP; -const S32 NO_STEPS = 15; -const F32 INV_NO_STEPS = 1.f/NO_STEPS; - - -// constants used in calculation of scattering coeff of clear air -const F32 sigma = 0.035f; -const F32 fsigma = (6.f + 3.f * sigma) / (6.f-7.f*sigma); -const F64 Ndens = 2.55e25; -const F64 Ndens2 = Ndens*Ndens; // HACK: Allow server to change sun and moon IDs. // I can't figure out how to pass the appropriate @@ -72,25 +48,9 @@ const F64 Ndens2 = Ndens*Ndens; extern LLUUID gSunTextureID; extern LLUUID gMoonTextureID; - -LL_FORCE_INLINE LLColor3 color_div(const LLColor3 &col1, const LLColor3 &col2) -{ - return LLColor3( - col1.mV[0] / col2.mV[0], - col1.mV[1] / col2.mV[1], - col1.mV[2] / col2.mV[2] ); -} - -LLColor3 color_norm(const LLColor3 &col); -BOOL clip_quad_to_horizon(F32& t_left, F32& t_right, LLVector3 v_clipped[4], - const LLVector3 v_corner[4], const F32 cos_max_angle); -F32 clip_side_to_horizon(const LLVector3& v0, const LLVector3& v1, const F32 cos_max_angle); - - class LLFace; class LLHaze; - class LLSkyTex { friend class LLVOSky; @@ -258,115 +218,6 @@ public: void setV(const LLVector3& v) { mV = v; } }; - -LL_FORCE_INLINE LLColor3 refr_ind_calc(const LLColor3 &wave_length) -{ - LLColor3 refr_ind; - for (S32 i = 0; i < 3; ++i) - { - const F32 wl2 = wave_length.mV[i] * wave_length.mV[i] * 1e-6f; - refr_ind.mV[i] = 6.43e3f + ( 2.95e6f / ( 146.0f - 1.f/wl2 ) ) + ( 2.55e4f / ( 41.0f - 1.f/wl2 ) ); - refr_ind.mV[i] *= 1.0e-8f; - refr_ind.mV[i] += 1.f; - } - return refr_ind; -} - - -class LLHaze -{ -public: - LLHaze() : mG(0), mFalloff(1), mAbsCoef(0.f) {mSigSca.setToBlack();} - LLHaze(const F32 g, const LLColor3& sca, const F32 fo = 2.f) : - mG(g), mSigSca(0.25f/F_PI * sca), mFalloff(fo), mAbsCoef(0.f) - { - mAbsCoef = color_intens(mSigSca) / sAirScaIntense; - } - - LLHaze(const F32 g, const F32 sca, const F32 fo = 2.f) : mG(g), - mSigSca(0.25f/F_PI * LLColor3(sca, sca, sca)), mFalloff(fo) - { - mAbsCoef = 0.01f * sca / sAirScaAvg; - } - - F32 getG() const { return mG; } - - void setG(const F32 g) - { - mG = g; - } - - const LLColor3& getSigSca() const // sea level - { - return mSigSca; - } - - void setSigSca(const LLColor3& s) - { - mSigSca = s; - mAbsCoef = 0.01f * color_intens(mSigSca) / sAirScaIntense; - } - - void setSigSca(const F32 s0, const F32 s1, const F32 s2) - { - mSigSca = sAirScaAvg * LLColor3 (s0, s1, s2); - mAbsCoef = 0.01f * (s0 + s1 + s2) / 3; - } - - F32 getFalloff() const - { - return mFalloff; - } - - void setFalloff(const F32 fo) - { - mFalloff = fo; - } - - F32 getAbsCoef() const - { - return mAbsCoef; - } - - inline static F32 calcFalloff(const F32 h) - { - return (h <= 0) ? 1.0f : (F32)LL_FAST_EXP(-ATM_EXP_FALLOFF * h); - } - - inline LLColor3 calcSigSca(const F32 h) const - { - return calcFalloff(h * mFalloff) * mSigSca; - } - - inline void calcSigSca(const F32 h, LLColor3 &result) const - { - result = mSigSca; - result *= calcFalloff(h * mFalloff); - } - - LLColor3 calcSigExt(const F32 h) const - { - return calcFalloff(h * mFalloff) * (1 + mAbsCoef) * mSigSca; - } - - F32 calcPhase(const F32 cos_theta) const; - - static inline LLColor3 calcAirSca(const F32 h); - static inline void calcAirSca(const F32 h, LLColor3 &result); - -private: - static LLColor3 const sAirScaSeaLevel; - static F32 const sAirScaIntense; - static F32 const sAirScaAvg; - -protected: - F32 mG; - LLColor3 mSigSca; - F32 mFalloff; // 1 - slow, >1 - faster - F32 mAbsCoef; -}; - - class LLCubeMap; // turn on floating point precision @@ -383,24 +234,6 @@ class LLVOSky : public LLStaticViewerObject public: void calcAtmospherics(void); -// LEGACY_ATMOSPHERICS - LLColor3 createDiffuseFromWL(LLColor3 diffuse, LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); - LLColor3 createAmbientFromWL(LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); - - void calcSkyColorWLVert(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLColor3 & vary_CloudColorSun, - LLColor3 & vary_CloudColorAmbient, F32 & vary_CloudDensity, - LLVector2 vary_HorizontalProjection[2]); - - LLColor3 calcSkyColorWLFrag(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLColor3 & vary_CloudColorSun, - LLColor3 & vary_CloudColorAmbient, F32 & vary_CloudDensity, - LLVector2 vary_HorizontalProjection[2]); - LLColor4 calcSkyColorInDir(const LLVector3& dir, bool isShiny = false); - - LLColor3 calcRadianceAtPoint(const LLVector3& pos) const - { - F32 radiance = mBrightnessScaleGuess * mSun.getIntensity(); - return LLColor3(radiance, radiance, radiance); - } void initSkyTextureDirs(const S32 side, const S32 tile); void createSkyTexture(const S32 side, const S32 tile); @@ -453,8 +286,6 @@ public: LLColor4 getSunAmbientColor() const; LLColor4 getMoonAmbientColor() const; LLColor4 getTotalAmbientColor() const; - LLColor4 getFogColor() const { return mFogColor; } - LLColor4 getGLFogColor() const { return mGLFogCol; } BOOL isSameFace(S32 idx, const LLFace* face) const { return mFace[idx] == face; } @@ -476,16 +307,18 @@ public: void updateReflectionGeometry(LLDrawable *drawable, F32 H, const LLHeavenBody& HB); - const LLHaze& getHaze() const { return mHaze; } - LLHaze& getHaze() { return mHaze; } - F32 getHazeConcentration() const { return mHazeConcentration; } - void setHaze(const LLHaze& h) { mHaze = h; } F32 getWorldScale() const { return mWorldScale; } void setWorldScale(const F32 s) { mWorldScale = s; } void updateFog(const F32 distance); - void setFogRatio(const F32 fog_ratio) { mFogRatio = fog_ratio; } + + void setFogRatio(const F32 fog_ratio) { m_legacyAtmospherics.setFogRatio(fog_ratio); } + F32 getFogRatio() const { return m_legacyAtmospherics.getFogRatio(); } + + LLColor4 getFogColor() const { return m_legacyAtmospherics.getFogColor(); } + LLColor4 getGLFogColor() const { return m_legacyAtmospherics.getGLFogColor(); } + LLColor4U getFadeColor() const; - F32 getFogRatio() const { return mFogRatio; } + void setCloudDensity(F32 cloud_density) { mCloudDensity = cloud_density; } void setWind ( const LLVector3& wind ) { mWind = wind.length(); } @@ -532,8 +365,6 @@ protected: LLColor3 mBrightestPointNew; F32 mBrightnessScaleGuess; LLColor3 mBrightestPointGuess; - LLHaze mHaze; - F32 mHazeConcentration; BOOL mWeatherChange; F32 mCloudDensity; F32 mWind; @@ -545,53 +376,16 @@ protected: F32 mAmbientScale; LLColor3 mNightColorShift; F32 mInterpVal; - - LLColor4 mFogColor; - LLColor4 mGLFogCol; - - F32 mFogRatio; F32 mWorldScale; - LLPointer mCubeMap; // Cube map for the environment - S32 mDrawRefl; + LLPointer mCubeMap; // Cube map for the environment + S32 mDrawRefl; LLFrameTimer mUpdateTimer; -public: - //by bao - //fake vertex buffer updating - //to guarantee at least updating one VBO buffer every frame - //to work around the bug caused by ATI card --> DEV-3855 - // - void createDummyVertexBuffer() ; - void updateDummyVertexBuffer() ; - - BOOL mHeavenlyBodyUpdated ; -}; - -// turn it off -#if LL_MSVC && __MSVC_VER__ < 8 -#pragma optimize("p", off) -#endif - -// Utility functions -F32 azimuth(const LLVector3 &v); -F32 color_norm_pow(LLColor3& col, F32 e, BOOL postmultiply = FALSE); - - -/* Proportion of light that is scattered into 'path' from 'in' over distance dt. */ -/* assumes that vectors 'path' and 'in' are normalized. Scattering coef / 2pi */ - -inline LLColor3 LLHaze::calcAirSca(const F32 h) -{ - return calcFalloff(h) * sAirScaSeaLevel; -} - -inline void LLHaze::calcAirSca(const F32 h, LLColor3 &result) -{ - result = sAirScaSeaLevel; - result *= calcFalloff(h); -} + BOOL mHeavenlyBodyUpdated ; + LLAtmospherics m_legacyAtmospherics; +}; #endif -- cgit v1.2.3 From 6d77503542216ece1eecf82dce19ebd8d6be7327 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Wed, 7 Mar 2018 23:49:37 +0000 Subject: Isolate more legacy atmo param use in sky (convert to getLightAttenuation and getLightTransmittance). Optimize sky texture creation. --- indra/newview/llvosky.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index e4d99a5e8b..f8a6827a2b 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -230,13 +230,7 @@ class LLCubeMap; class LLVOSky : public LLStaticViewerObject { - -public: - void calcAtmospherics(void); - - void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(const S32 side, const S32 tile); - +public: enum { FACE_SIDE0, @@ -249,7 +243,6 @@ public: FACE_MOON, // was 7 FACE_BLOOM, // was 8 FACE_REFLECTION, // was 10 - FACE_DUMMY, //for an ATI bug --bao FACE_COUNT }; @@ -343,6 +336,11 @@ public: protected: ~LLVOSky(); + void updateDirections(void); + + void initSkyTextureDirs(const S32 side, const S32 tile); + void createSkyTexture(const S32 side, const S32 tile); + LLPointer mSunTexturep; LLPointer mMoonTexturep; LLPointer mBloomTexturep; -- cgit v1.2.3 From 096ea05a936d178ce0533708edab27708e9e718f Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Thu, 8 Mar 2018 00:04:03 +0000 Subject: Rename getFogColor from water and sky settings to getWaterFogColor and getSkyFogColor. --- indra/newview/llvosky.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index f8a6827a2b..e93ff51a66 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -307,7 +307,7 @@ public: void setFogRatio(const F32 fog_ratio) { m_legacyAtmospherics.setFogRatio(fog_ratio); } F32 getFogRatio() const { return m_legacyAtmospherics.getFogRatio(); } - LLColor4 getFogColor() const { return m_legacyAtmospherics.getFogColor(); } + LLColor4 getSkyFogColor() const { return m_legacyAtmospherics.getFogColor(); } LLColor4 getGLFogColor() const { return m_legacyAtmospherics.getGLFogColor(); } LLColor4U getFadeColor() const; -- cgit v1.2.3 From 087e21082512bce899e435537d7d60a09ef6eaca Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Thu, 8 Mar 2018 16:09:29 +0000 Subject: Add LLVoSky wrapper for current env sky light direction. Make LLVo classes use LLVoSky wrappers instead of direct access. Isolate more legacy haze param usage w/in settings. --- indra/newview/llvosky.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index e93ff51a66..7b5ea38999 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -274,6 +274,7 @@ public: const LLVector3& getToMoonLast() const { return mMoon.getDirectionCached(); } BOOL isSunUp() const { return mSun.getDirectionCached().mV[2] > -0.05f; } + LLVector3 getLightDirection() const; LLColor3 getSunDiffuseColor() const; LLColor3 getMoonDiffuseColor() const; LLColor4 getSunAmbientColor() const; -- cgit v1.2.3 From 6dfa720e75cd61e6b502c30d15511d2b447f7eb4 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Fri, 20 Apr 2018 18:52:41 +0100 Subject: Remove optimize pragmas necessary for working with RWDI in MSVC, but toxic to Clang. --- indra/newview/llvosky.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 7b5ea38999..a6445a0fa6 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -220,14 +220,6 @@ public: class LLCubeMap; -// turn on floating point precision -// in vs2003 for this class. Otherwise -// black dots go everywhere from 7:10 - 8:50 -#if LL_MSVC && __MSVC_VER__ < 8 -#pragma optimize("p", on) -#endif - - class LLVOSky : public LLStaticViewerObject { public: -- cgit v1.2.3 From 39fb9cc9b4221b6fb715e9f59ae5512b76baa1ba Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Fri, 18 May 2018 00:23:58 +0100 Subject: Fix Mie Config validation in sky settings. Start cleanup of heavenly body rendering. --- indra/newview/llvosky.h | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index a6445a0fa6..8a9e3b3a91 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -147,8 +147,6 @@ protected: BOOL mVisible; static F32 sInterpVal; LLVector3 mQuadCorner[4]; - LLVector3 mU; - LLVector3 mV; LLVector3 mO; public: @@ -188,14 +186,9 @@ public: return sInterpVal * mColor + (1 - sInterpVal) * mColorCached; } - const F32& getHorizonVisibility() const { return mHorizonVisibility; } - void setHorizonVisibility(const F32 c = 1) { mHorizonVisibility = c; } const F32& getVisibility() const { return mVisibility; } void setVisibility(const F32 c = 1) { mVisibility = c; } - F32 getHaloBrighness() const - { - return llmax(0.f, llmin(0.9f, mHorizonVisibility)) * mVisibility; - } + BOOL isVisible() const { return mVisible; } void setVisible(const BOOL v) { mVisible = v; } @@ -211,11 +204,6 @@ public: const LLVector3& corner(const S32 n) const { return mQuadCorner[n]; } LLVector3& corner(const S32 n) { return mQuadCorner[n]; } const LLVector3* corners() const { return mQuadCorner; } - - const LLVector3& getU() const { return mU; } - const LLVector3& getV() const { return mV; } - void setU(const LLVector3& u) { mU = u; } - void setV(const LLVector3& v) { mV = v; } }; class LLCubeMap; @@ -279,19 +267,8 @@ public: void setSunDirection(const LLVector3 &sun_dir, const LLVector3 &moon_dir); - BOOL updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 side, const BOOL is_sun, - LLHeavenBody& hb, const F32 sin_max_angle, - const LLVector3 &up, const LLVector3 &right); - - F32 cosHorizon(const F32 delta = 0) const - { - const F32 sin_angle = EARTH_RADIUS/(EARTH_RADIUS + mCameraPosAgent.mV[2]); - return delta - (F32)sqrt(1.f - sin_angle * sin_angle); - } - - void updateSunHaloGeometry(LLDrawable *drawable); + BOOL updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 side, LLHeavenBody& hb, const LLVector3 &up, const LLVector3 &right); void updateReflectionGeometry(LLDrawable *drawable, F32 H, const LLHeavenBody& HB); - F32 getWorldScale() const { return mWorldScale; } void setWorldScale(const F32 s) { mWorldScale = s; } -- cgit v1.2.3 From 64302d3000b69b31e72eb6a3bd8a981c80cb88de Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 1 Jun 2018 00:18:36 +0100 Subject: Modify use of sky settings, reduce complexity, and name funcs to indicate coord systems in use. Fix class2 softenLightF shader. --- indra/newview/llvosky.h | 109 ++++++++++++++++++------------------------------ 1 file changed, 41 insertions(+), 68 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 96fe12e21c..4de3d12068 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -141,69 +141,56 @@ protected: LLVector3 mAngularVelocity; // velocity of the local heavenly body F32 mDiskRadius; - BOOL mDraw; // FALSE - do not draw. + bool mDraw; // FALSE - do not draw. F32 mHorizonVisibility; // number [0, 1] due to how horizon F32 mVisibility; // same but due to other objects being in throng. - BOOL mVisible; + bool mVisible; static F32 sInterpVal; LLVector3 mQuadCorner[4]; LLVector3 mO; public: - LLHeavenBody(const F32 rad) : - mDirectionCached(LLVector3(0,0,0)), - mDirection(LLVector3(0,0,0)), - mIntensity(0.f), - mDiskRadius(rad), mDraw(FALSE), - mHorizonVisibility(1.f), mVisibility(1.f), - mVisible(FALSE) - { - mColor.setToBlack(); - mColorCached.setToBlack(); - } + LLHeavenBody(const F32 rad); ~LLHeavenBody() {} - const LLVector3& getDirection() const { return mDirection; } - void setDirection(const LLVector3 &direction) { mDirection = direction; } - void setAngularVelocity(const LLVector3 &ang_vel) { mAngularVelocity = ang_vel; } - const LLVector3& getAngularVelocity() const { return mAngularVelocity; } + const LLVector3& getDirection() const; + void setDirection(const LLVector3 &direction); + void setAngularVelocity(const LLVector3 &ang_vel); + const LLVector3& getAngularVelocity() const; - const LLVector3& getDirectionCached() const { return mDirectionCached; } - void renewDirection() { mDirectionCached = mDirection; } + const LLVector3& getDirectionCached() const; + void renewDirection(); - const LLColor3& getColorCached() const { return mColorCached; } - void setColorCached(const LLColor3& c) { mColorCached = c; } - const LLColor3& getColor() const { return mColor; } - void setColor(const LLColor3& c) { mColor = c; } + const LLColor3& getColorCached() const; + void setColorCached(const LLColor3& c); + const LLColor3& getColor() const; + void setColor(const LLColor3& c); - void renewColor() { mColorCached = mColor; } + void renewColor(); - static F32 interpVal() { return sInterpVal; } - static void setInterpVal(const F32 v) { sInterpVal = v; } + static F32 interpVal(); + static void setInterpVal(const F32 v); - LLColor3 getInterpColor() const - { - return sInterpVal * mColor + (1 - sInterpVal) * mColorCached; - } + LLColor3 getInterpColor() const; - const F32& getVisibility() const { return mVisibility; } - void setVisibility(const F32 c = 1) { mVisibility = c; } + const F32& getVisibility() const; + void setVisibility(const F32 c = 1); - BOOL isVisible() const { return mVisible; } - void setVisible(const BOOL v) { mVisible = v; } + bool isVisible() const; + void setVisible(const bool v); - const F32& getIntensity() const { return mIntensity; } - void setIntensity(const F32 c) { mIntensity = c; } + const F32& getIntensity() const; + void setIntensity(const F32 c); - void setDiskRadius(const F32 radius) { mDiskRadius = radius; } - F32 getDiskRadius() const { return mDiskRadius; } + void setDiskRadius(const F32 radius); + F32 getDiskRadius() const; - void setDraw(const BOOL draw) { mDraw = draw; } - BOOL getDraw() const { return mDraw; } + void setDraw(const bool draw); + bool getDraw() const; - const LLVector3& corner(const S32 n) const { return mQuadCorner[n]; } - LLVector3& corner(const S32 n) { return mQuadCorner[n]; } - const LLVector3* corners() const { return mQuadCorner; } + const LLVector3& corner(const S32 n) const; + LLVector3& corner(const S32 n); + const LLVector3* corners() const; }; class LLCubeMap; @@ -237,7 +224,7 @@ public: void restoreGL(); /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); - BOOL updateSky(); + bool updateSky(); // Graphical stuff for objects - maybe broken out into render class // later? @@ -245,29 +232,15 @@ public: /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); - const LLHeavenBody& getSun() const { return mSun; } + const LLHeavenBody& getSun() const { return mSun; } const LLHeavenBody& getMoon() const { return mMoon; } - //const LLVector3& getToSunLast() const { return mSun.getDirectionCached(); } - //const LLVector3& getToSun() const { return mSun.getDirection(); } - //const LLVector3& getToMoon() const { return mMoon.getDirection(); } - //const LLVector3& getToMoonLast() const { return mMoon.getDirectionCached(); } - //BOOL isSunUp() const { return mSun.getDirectionCached().mV[2] > -0.05f; } - - LLVector3 getLightDirection() const; - LLColor3 getSunDiffuseColor() const; - LLColor3 getMoonDiffuseColor() const; - LLColor4 getSunAmbientColor() const; - LLColor4 getMoonAmbientColor() const; - LLColor4 getTotalAmbientColor() const; - - BOOL isSameFace(S32 idx, const LLFace* face) const { return mFace[idx] == face; } - - void initSunDirection(const LLVector3 &sun_dir, const LLVector3 &sun_ang_velocity); + bool isSameFace(S32 idx, const LLFace* face) const { return mFace[idx] == face; } - void setSunDirection(const LLVector3 &sun_dir, const LLVector3 &moon_dir); + // directions provided should already be in CFR coord sys (+x at, +z up, +y right) + void setSunAndMoonDirectionsCFR(const LLVector3 &sun_dir, const LLVector3 &moon_dir); - BOOL updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 side, LLHeavenBody& hb, const LLVector3 &up, const LLVector3 &right); + bool updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 side, LLHeavenBody& hb, const LLVector3 &up, const LLVector3 &right); void updateReflectionGeometry(LLDrawable *drawable, F32 H, const LLHeavenBody& HB); F32 getWorldScale() const { return mWorldScale; } @@ -291,7 +264,7 @@ public: LLCubeMap *getCubeMap() const { return mCubeMap; } S32 getDrawRefl() const { return mDrawRefl; } void setDrawRefl(const S32 r) { mDrawRefl = r; } - BOOL isReflFace(const LLFace* face) const { return face == mFace[FACE_REFLECTION]; } + bool isReflFace(const LLFace* face) const { return face == mFace[FACE_REFLECTION]; } LLFace* getReflFace() const { return mFace[FACE_REFLECTION]; } LLViewerTexture* getSunTex() const { return mSunTexturep; } @@ -333,12 +306,12 @@ protected: LLColor3 mBrightestPointNew; F32 mBrightnessScaleGuess; LLColor3 mBrightestPointGuess; - BOOL mWeatherChange; + bool mWeatherChange; F32 mCloudDensity; F32 mWind; - BOOL mInitialized; - BOOL mForceUpdate; //flag to force instantaneous update of cubemap + bool mInitialized; + bool mForceUpdate; //flag to force instantaneous update of cubemap LLVector3 mLastLightingDirection; LLColor3 mLastTotalAmbient; F32 mAmbientScale; @@ -351,7 +324,7 @@ protected: LLFrameTimer mUpdateTimer; - BOOL mHeavenlyBodyUpdated ; + bool mHeavenlyBodyUpdated ; LLAtmospherics m_legacyAtmospherics; }; -- cgit v1.2.3 From 507c4921826e73635f6ae31087ab0e6cd1280f43 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 8 Jun 2018 22:22:20 +0100 Subject: Add specific shader for the moon to allow different rendering at day vs night. Add MouseMoon positioning ala MouseSun debug setting and accessors to use it. --- indra/newview/llvosky.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 4de3d12068..3d77c3f8e9 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -239,6 +239,8 @@ public: // directions provided should already be in CFR coord sys (+x at, +z up, +y right) void setSunAndMoonDirectionsCFR(const LLVector3 &sun_dir, const LLVector3 &moon_dir); + void setSunDirectionCFR(const LLVector3 &sun_direction); + void setMoonDirectionCFR(const LLVector3 &moon_direction); bool updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 side, LLHeavenBody& hb, const LLVector3 &up, const LLVector3 &right); void updateReflectionGeometry(LLDrawable *drawable, F32 H, const LLHeavenBody& HB); -- cgit v1.2.3 From a0598b12656cdcf22ba95cacd01b5ff36f8f1b26 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 11 Jun 2018 17:46:16 +0100 Subject: Fix water fog consolidation in underwater shaders. Add plumbing facilities to allow current and next moon textures to be passed to moon shader. Modify moon shader to blend between current and next moon textures by blend factor. --- indra/newview/llvosky.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 3d77c3f8e9..d6d294de6a 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -45,8 +45,8 @@ const F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR; // HACK: Allow server to change sun and moon IDs. // I can't figure out how to pass the appropriate // information into the LLVOSky constructor. JC -extern LLUUID gSunTextureID; -extern LLUUID gMoonTextureID; +//extern LLUUID gSunTextureID; +//extern LLUUID gMoonTextureID; class LLFace; class LLHaze; @@ -269,9 +269,13 @@ public: bool isReflFace(const LLFace* face) const { return face == mFace[FACE_REFLECTION]; } LLFace* getReflFace() const { return mFace[FACE_REFLECTION]; } - LLViewerTexture* getSunTex() const { return mSunTexturep; } - LLViewerTexture* getMoonTex() const { return mMoonTexturep; } - LLViewerTexture* getBloomTex() const { return mBloomTexturep; } + LLViewerTexture* getSunTex() const { return mSunTexturep[0]; } + LLViewerTexture* getMoonTex() const { return mMoonTexturep[0]; } + LLViewerTexture* getBloomTex() const { return mBloomTexturep; } + + void setSunTextures(const LLUUID& sun_texture, const LLUUID& sun_texture_next); + void setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_texture_next); + void forceSkyUpdate(void) { mForceUpdate = TRUE; } public: @@ -286,8 +290,8 @@ protected: void initSkyTextureDirs(const S32 side, const S32 tile); void createSkyTexture(const S32 side, const S32 tile); - LLPointer mSunTexturep; - LLPointer mMoonTexturep; + LLPointer mSunTexturep[2]; + LLPointer mMoonTexturep[2]; LLPointer mBloomTexturep; static S32 sResolution; -- cgit v1.2.3 From fc8d0de673da0e02915556008a365aca67472eba Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 11 Jun 2018 22:39:57 +0100 Subject: Make cloud rendering use textures defined in sky settings and add code to shaders to lerp between current and next cloud texture. --- indra/newview/llvosky.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index d6d294de6a..d7f7700dd0 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -272,9 +272,16 @@ public: LLViewerTexture* getSunTex() const { return mSunTexturep[0]; } LLViewerTexture* getMoonTex() const { return mMoonTexturep[0]; } LLViewerTexture* getBloomTex() const { return mBloomTexturep; } + LLViewerTexture* getCloudNoiseTex() const { return mCloudNoiseTexturep[0]; } + + LLViewerTexture* getSunTexNext() const { return mSunTexturep[1]; } + LLViewerTexture* getMoonTexNext() const { return mMoonTexturep[1]; } + LLViewerTexture* getBloomTexNext() const { return mBloomTexturep; } + LLViewerTexture* getCloudNoiseTexNext() const { return mCloudNoiseTexturep[1]; } void setSunTextures(const LLUUID& sun_texture, const LLUUID& sun_texture_next); void setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_texture_next); + void setCloudNoiseTextures(const LLUUID& cloud_noise_texture, const LLUUID& cloud_noise_texture_next); void forceSkyUpdate(void) { mForceUpdate = TRUE; } @@ -292,6 +299,7 @@ protected: LLPointer mSunTexturep[2]; LLPointer mMoonTexturep[2]; + LLPointer mCloudNoiseTexturep[2]; LLPointer mBloomTexturep; static S32 sResolution; -- cgit v1.2.3 From 34865c4bb5cd12219606f44748159fe7cbeea264 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 13 Jun 2018 00:51:39 +0100 Subject: Mods to hook up water settings to water normals for rendering with support for current to next blending. Modify LLSettingsFoo::buildDefaultFoo to use a static and avoid re-validation of default sky/water/daycycle settings. Remove all references to gSun/MoonTextureId globals (they should come from sky settings now). --- indra/newview/llvosky.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index d7f7700dd0..5294addcec 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -42,12 +42,6 @@ const F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 10.f; const F32 HEAVENLY_BODY_FACTOR = 0.1f; const F32 HEAVENLY_BODY_SCALE = HEAVENLY_BODY_DIST * HEAVENLY_BODY_FACTOR; -// HACK: Allow server to change sun and moon IDs. -// I can't figure out how to pass the appropriate -// information into the LLVOSky constructor. JC -//extern LLUUID gSunTextureID; -//extern LLUUID gMoonTextureID; - class LLFace; class LLHaze; -- cgit v1.2.3 From 8969b114357d189e1bf39024762698eeddddfc78 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 3 Jul 2018 16:37:32 +0100 Subject: MAINT-8838 render a sun disc if the texture(s) are provided by WL settings (default is no sun disc and just haze) Refactor sky texture optimization to retain building the cubemap used by shiny. --- indra/newview/llvosky.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 5294addcec..a9a59681ff 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -289,7 +289,7 @@ protected: void updateDirections(void); void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(const S32 side, const S32 tile); + void createSkyTexture(const S32 side, const S32 tile, bool use_windlight_shaders); LLPointer mSunTexturep[2]; LLPointer mMoonTexturep[2]; -- cgit v1.2.3 From a90e61b798711306496c2ed7aa5cce6d096ea466 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 10 Jul 2018 19:08:14 +0100 Subject: Support blending current/next bloom textures in deferred star rendering. --- indra/newview/llvosky.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index a9a59681ff..758a4a8c94 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -263,19 +263,20 @@ public: bool isReflFace(const LLFace* face) const { return face == mFace[FACE_REFLECTION]; } LLFace* getReflFace() const { return mFace[FACE_REFLECTION]; } - LLViewerTexture* getSunTex() const { return mSunTexturep[0]; } - LLViewerTexture* getMoonTex() const { return mMoonTexturep[0]; } - LLViewerTexture* getBloomTex() const { return mBloomTexturep; } + LLViewerTexture* getSunTex() const { return mSunTexturep[0]; } + LLViewerTexture* getMoonTex() const { return mMoonTexturep[0]; } + LLViewerTexture* getBloomTex() const { return mBloomTexturep[0]; } LLViewerTexture* getCloudNoiseTex() const { return mCloudNoiseTexturep[0]; } - LLViewerTexture* getSunTexNext() const { return mSunTexturep[1]; } - LLViewerTexture* getMoonTexNext() const { return mMoonTexturep[1]; } - LLViewerTexture* getBloomTexNext() const { return mBloomTexturep; } + LLViewerTexture* getSunTexNext() const { return mSunTexturep[1]; } + LLViewerTexture* getMoonTexNext() const { return mMoonTexturep[1]; } + LLViewerTexture* getBloomTexNext() const { return mBloomTexturep[1]; } LLViewerTexture* getCloudNoiseTexNext() const { return mCloudNoiseTexturep[1]; } void setSunTextures(const LLUUID& sun_texture, const LLUUID& sun_texture_next); void setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_texture_next); void setCloudNoiseTextures(const LLUUID& cloud_noise_texture, const LLUUID& cloud_noise_texture_next); + void setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_texture_next); void forceSkyUpdate(void) { mForceUpdate = TRUE; } @@ -294,7 +295,7 @@ protected: LLPointer mSunTexturep[2]; LLPointer mMoonTexturep[2]; LLPointer mCloudNoiseTexturep[2]; - LLPointer mBloomTexturep; + LLPointer mBloomTexturep[2]; static S32 sResolution; static S32 sTileResX; -- cgit v1.2.3 From e3ef7294775c59a8b96ee05b52bba8acc3f8bfa3 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 19 Jul 2018 21:32:35 +0100 Subject: Remove optimization of building skybox as possible source of MAINT-8864 --- indra/newview/llvosky.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 758a4a8c94..d8039b7f80 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -290,7 +290,7 @@ protected: void updateDirections(void); void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(const S32 side, const S32 tile, bool use_windlight_shaders); + void createSkyTexture(const S32 side, const S32 tile); LLPointer mSunTexturep[2]; LLPointer mMoonTexturep[2]; -- cgit v1.2.3 From f45edabe478eb2e5ed899377f541875cbd566977 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 22 Aug 2018 23:02:16 +0100 Subject: MAINT-9026 hook up sun/moon scale to settingsvo and render code --- indra/newview/llvosky.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index d8039b7f80..4943c48f7c 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -236,7 +236,7 @@ public: void setSunDirectionCFR(const LLVector3 &sun_direction); void setMoonDirectionCFR(const LLVector3 &moon_direction); - bool updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 side, LLHeavenBody& hb, const LLVector3 &up, const LLVector3 &right); + bool updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const S32 side, LLHeavenBody& hb, const LLVector3 &up, const LLVector3 &right); void updateReflectionGeometry(LLDrawable *drawable, F32 H, const LLHeavenBody& HB); F32 getWorldScale() const { return mWorldScale; } @@ -278,6 +278,9 @@ public: void setCloudNoiseTextures(const LLUUID& cloud_noise_texture, const LLUUID& cloud_noise_texture_next); void setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_texture_next); + void setSunScale(F32 sun_scale); + void setMoonScale(F32 sun_scale); + void forceSkyUpdate(void) { mForceUpdate = TRUE; } public: @@ -297,6 +300,9 @@ protected: LLPointer mCloudNoiseTexturep[2]; LLPointer mBloomTexturep[2]; + F32 mSunScale = 1.0f; + F32 mMoonScale = 1.0f; + static S32 sResolution; static S32 sTileResX; static S32 sTileResY; -- cgit v1.2.3 From 2e55eae9cc6ebff303c8f322c71fec9c20e42bd8 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 4 Sep 2018 23:08:20 +0100 Subject: Merge and fix MAINT-9087 and MAINT-9084 --- indra/newview/llvosky.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 4943c48f7c..be69757fc7 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -338,7 +338,7 @@ protected: S32 mDrawRefl; LLFrameTimer mUpdateTimer; - + LLTimer mForceUpdateThrottle; bool mHeavenlyBodyUpdated ; LLAtmospherics m_legacyAtmospherics; -- cgit v1.2.3 From 1f69a685eb7d403b8ad5b2ebc24978151da49910 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 7 Sep 2018 22:10:14 +0100 Subject: MAINT-8988 Make rebuilding sky tex not look up invariant values by converting from LLSD 15 times per pixel. Set range on density multiplier to be non-zero to clamp light attenuation to sane values. Fix UI for density multiplier to include 4 decimal places and not show 0.0003 as 0.00 --- indra/newview/llvosky.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index be69757fc7..a6f361f5be 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -293,7 +293,7 @@ protected: void updateDirections(void); void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(const S32 side, const S32 tile); + void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile); LLPointer mSunTexturep[2]; LLPointer mMoonTexturep[2]; -- cgit v1.2.3 From a21fa8664b596a6d3dd08d6d9a52bb41515bd159 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 13 Sep 2018 00:34:24 +0100 Subject: SL-1127 fix sky tex update with EEP interpolation getting confused Disable RenderUseAdvancedAtmospherics in feature table to prevent Ultra from turning it on before its time. --- indra/newview/llvosky.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index a6f361f5be..ed190892fe 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -74,11 +74,11 @@ protected: ~LLSkyTex(); - static S32 getResolution() { return sResolution; } - static S32 getCurrent() { return sCurrent; } - static S32 stepCurrent() { sCurrent++; sCurrent &= 1; return sCurrent; } - static S32 getNext() { return ((sCurrent+1) & 1); } - static S32 getWhich(const BOOL curr) { return curr ? sCurrent : getNext(); } + static S32 getResolution(); + static S32 getCurrent(); + static S32 stepCurrent(); + static S32 getNext(); + static S32 getWhich(const BOOL curr); void initEmpty(const S32 tex); @@ -118,7 +118,7 @@ protected: return col; } - LLImageRaw* getImageRaw(BOOL curr=TRUE) { return mImageRaw[getWhich(curr)]; } + LLImageRaw* getImageRaw(BOOL curr=TRUE); void createGLImage(BOOL curr=TRUE); }; -- cgit v1.2.3 From 17ce10ccd98d4795784466bb217e877ca2d8bad2 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 2 Oct 2018 15:43:03 +0100 Subject: SL-9687 Make WL sky updates only update the env map (the only map used when WL shaders are in effect) to reduce the cost of generating sky textures. Update of env map only is 6ms where sky + env map is 14+ms. --- indra/newview/llvosky.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index ed190892fe..e465dcbe27 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -293,7 +293,7 @@ protected: void updateDirections(void); void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile); + void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile, bool skip_sky_tex); LLPointer mSunTexturep[2]; LLPointer mMoonTexturep[2]; -- cgit v1.2.3 From 5eed233618abd7020e130799be2abe0f986543f6 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 5 Oct 2018 21:32:42 +0100 Subject: SL-1925 More settings for rainbow/halo atmospheric effects, final default asset UUIDs, and shader mods. --- indra/newview/llvosky.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index e465dcbe27..660db1e518 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -263,15 +263,18 @@ public: bool isReflFace(const LLFace* face) const { return face == mFace[FACE_REFLECTION]; } LLFace* getReflFace() const { return mFace[FACE_REFLECTION]; } - LLViewerTexture* getSunTex() const { return mSunTexturep[0]; } - LLViewerTexture* getMoonTex() const { return mMoonTexturep[0]; } - LLViewerTexture* getBloomTex() const { return mBloomTexturep[0]; } - LLViewerTexture* getCloudNoiseTex() const { return mCloudNoiseTexturep[0]; } + LLViewerTexture* getSunTex() const { return mSunTexturep[0]; } + LLViewerTexture* getMoonTex() const { return mMoonTexturep[0]; } + LLViewerTexture* getBloomTex() const { return mBloomTexturep[0]; } + LLViewerTexture* getCloudNoiseTex() const { return mCloudNoiseTexturep[0]; } - LLViewerTexture* getSunTexNext() const { return mSunTexturep[1]; } - LLViewerTexture* getMoonTexNext() const { return mMoonTexturep[1]; } - LLViewerTexture* getBloomTexNext() const { return mBloomTexturep[1]; } - LLViewerTexture* getCloudNoiseTexNext() const { return mCloudNoiseTexturep[1]; } + LLViewerTexture* getRainbowTex() const { return mRainbowMap; } + LLViewerTexture* getHaloTex() const { return mHaloMap; } + + LLViewerTexture* getSunTexNext() const { return mSunTexturep[1]; } + LLViewerTexture* getMoonTexNext() const { return mMoonTexturep[1]; } + LLViewerTexture* getBloomTexNext() const { return mBloomTexturep[1]; } + LLViewerTexture* getCloudNoiseTexNext() const { return mCloudNoiseTexturep[1]; } void setSunTextures(const LLUUID& sun_texture, const LLUUID& sun_texture_next); void setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_texture_next); @@ -299,6 +302,8 @@ protected: LLPointer mMoonTexturep[2]; LLPointer mCloudNoiseTexturep[2]; LLPointer mBloomTexturep[2]; + LLPointer mRainbowMap; + LLPointer mHaloMap; F32 mSunScale = 1.0f; F32 mMoonScale = 1.0f; -- cgit v1.2.3 From 75858d9f3ff1f6adae4e6b4c4726eecfc57d0e11 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 19 Oct 2018 17:45:40 +0100 Subject: SL-9929 Replace WL atmospherics sun color calcs, fix water specular sunlight contribution to use them, and do not add moon contribution during daytime. --- indra/newview/llvosky.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 660db1e518..20d0135c21 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -217,6 +217,8 @@ public: void cleanupGL(); void restoreGL(); + void calc(); + /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); bool updateSky(); @@ -346,6 +348,7 @@ protected: LLTimer mForceUpdateThrottle; bool mHeavenlyBodyUpdated ; + AtmosphericsVars m_atmosphericsVars; LLAtmospherics m_legacyAtmospherics; }; -- cgit v1.2.3 From b6fa72d3c4d02527f6d118eadc9ba1ac48a297f5 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 3 Dec 2018 15:33:15 -0800 Subject: SL-10055 Modify handling of directional light to prefer sun when it is up but use moon dir/color when it is alone in the sky. Modify handling of shader in shaders to get some shadowing of ambient and nighttime shadowing. --- indra/newview/llvosky.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 20d0135c21..0713661295 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -334,7 +334,8 @@ protected: bool mInitialized; bool mForceUpdate; //flag to force instantaneous update of cubemap - LLVector3 mLastLightingDirection; + LLVector3 mLastSunLightingDirection; + LLVector3 mLastMoonLightingDirection; LLColor3 mLastTotalAmbient; F32 mAmbientScale; LLColor3 mNightColorShift; -- cgit v1.2.3 From 966dc7fc8fb1fade861e8070e9c5fbbfe4d0cb45 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 24 Jan 2019 14:54:11 -0800 Subject: SL-10276 SL-9851 Fix cloud shaders to ignore clouds when cloud_scale is 0. Fix creation of heavenly body geo to avoid degenerate vector math and not randomly flip orientation when crossing zenith. Add sun_up_factor to eliminate sun glow around moon when sun is down. --- indra/newview/llvosky.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 0713661295..a9ef5474b6 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -30,6 +30,7 @@ #include "stdtypes.h" #include "v3color.h" #include "v4coloru.h" +#include "llquaternion.h" #include "llviewertexture.h" #include "llviewerobject.h" #include "llframetimer.h" @@ -38,7 +39,7 @@ #include "lllegacyatmospherics.h" const F32 SKY_BOX_MULT = 16.0f; -const F32 HEAVENLY_BODY_DIST = HORIZON_DIST - 10.f; +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; @@ -132,6 +133,7 @@ protected: LLColor3 mColorCached; F32 mIntensity; LLVector3 mDirection; // direction of the local heavenly body + LLQuaternion mRotation; LLVector3 mAngularVelocity; // velocity of the local heavenly body F32 mDiskRadius; @@ -147,6 +149,9 @@ public: LLHeavenBody(const F32 rad); ~LLHeavenBody() {} + const LLQuaternion& getRotation() const; + void setRotation(const LLQuaternion& rot); + const LLVector3& getDirection() const; void setDirection(const LLVector3 &direction); void setAngularVelocity(const LLVector3 &ang_vel); -- cgit v1.2.3 From 8ba159fed90fc221003e85c5d2d3b82ec30d81bf Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 27 Jun 2019 09:10:38 -0700 Subject: SL-11151, SL-11504 Remove update threshold logic causing hiccups and rework sky updates. Make deferred water do double transport again to match non-ALM rendering more closely. --- indra/newview/llvosky.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index a9ef5474b6..e118cc7200 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -303,7 +303,7 @@ protected: void updateDirections(void); void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile, bool skip_sky_tex); + void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile, LLSkyTex* tex); LLPointer mSunTexturep[2]; LLPointer mMoonTexturep[2]; @@ -350,11 +350,11 @@ protected: LLPointer mCubeMap; // Cube map for the environment S32 mDrawRefl; - LLFrameTimer mUpdateTimer; LLTimer mForceUpdateThrottle; bool mHeavenlyBodyUpdated ; AtmosphericsVars m_atmosphericsVars; + AtmosphericsVars m_lastAtmosphericsVars; LLAtmospherics m_legacyAtmospherics; }; -- cgit v1.2.3 From d23bf2c16e2d36b18c920bbd42f49c47f3c58bd9 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 10 Jul 2019 13:02:09 -0700 Subject: SL-11541 WIP Make LLSettingsSky::gammaCorrect work like the soft scale clip and gamma correct from release. Add transmittance effects to the low-end sky tex gen. --- indra/newview/llvosky.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index e118cc7200..3c7ce4004c 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -303,7 +303,7 @@ protected: void updateDirections(void); void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile, LLSkyTex* tex); + void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile, LLSkyTex* tex, bool is_shiny = false); LLPointer mSunTexturep[2]; LLPointer mMoonTexturep[2]; -- cgit v1.2.3 From 695ec5229f6c8c80625e7d445232ae5fb0011327 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 11 Jul 2019 08:33:41 -0700 Subject: Fix knock-on from touching the sky tex gen which also generated the shiny env map. --- indra/newview/llvosky.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 3c7ce4004c..67a7059b5a 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -68,7 +68,7 @@ public: protected: LLSkyTex(); - void init(); + void init(bool isShiny); void cleanupGL(); void restoreGL(); @@ -121,6 +121,8 @@ protected: LLImageRaw* getImageRaw(BOOL curr=TRUE); void createGLImage(BOOL curr=TRUE); + + bool mIsShiny; }; /// TODO Move into the stars draw pool (and rename them appropriately). -- cgit v1.2.3 From 00590defe4f525229c392b6f345695a09ac6b679 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 16 Jul 2019 10:40:01 -0700 Subject: SL-11605 Fix broken throttling of sky/envmap updates. --- indra/newview/llvosky.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 67a7059b5a..8c2817e1ed 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -352,6 +352,7 @@ protected: LLPointer mCubeMap; // Cube map for the environment S32 mDrawRefl; + LLFrameTimer mUpdateTimer; LLTimer mForceUpdateThrottle; bool mHeavenlyBodyUpdated ; -- cgit v1.2.3 From 41c7523e08aab7f2bf4a040ac1c1c8a1d24babed Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 12 Aug 2019 13:44:59 -0700 Subject: SL-11676 Make sun/moon textures render on Low/Low-Mid again. Fix solar additive being present when moon was only heavenly body in sky. --- indra/newview/llvosky.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 8c2817e1ed..5f27085599 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -57,13 +57,8 @@ private: LLColor4 *mSkyData; LLVector3 *mSkyDirs; // Cache of sky direction vectors static S32 sCurrent; - static F32 sInterpVal; public: - static F32 getInterpVal() { return sInterpVal; } - static void setInterpVal(const F32 v) { sInterpVal = v; } - static BOOL doInterpolate() { return sInterpVal > 0.001f; } - void bindTexture(BOOL curr = TRUE); protected: @@ -299,6 +294,8 @@ public: LLFace *mFace[FACE_COUNT]; LLVector3 mBumpSunDir; + F32 getInterpVal() const { return mInterpVal; } + protected: ~LLVOSky(); -- cgit v1.2.3 From be74485334267339dee14018aa82f84cc34b0ecb Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 22 Aug 2019 20:33:34 +0300 Subject: SL-11776 Compensate freeze by spreading calculations --- indra/newview/llvosky.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 5f27085599..c3a04e12e5 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -337,7 +337,8 @@ protected: F32 mWind; bool mInitialized; - bool mForceUpdate; //flag to force instantaneous update of cubemap + bool mForceUpdate; // flag to force update of cubemap + S32 mCubeMapUpdateStage; // state of cubemap uodate: -1 idle; 0-5 per-face updates; 6 finalizing LLVector3 mLastSunLightingDirection; LLVector3 mLastMoonLightingDirection; LLColor3 mLastTotalAmbient; -- cgit v1.2.3 From 8960a56f531745bc2d434bdddb6c65731621f596 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 22 Aug 2019 11:19:04 -0700 Subject: SL-11776 Fix false alarming sky updates and doing expensive CPU work for same sky pixels. --- indra/newview/llvosky.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 5f27085599..6c9d6dc8be 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -288,7 +288,7 @@ public: void setSunScale(F32 sun_scale); void setMoonScale(F32 sun_scale); - void forceSkyUpdate(void) { mForceUpdate = TRUE; } + void forceSkyUpdate(void); public: LLFace *mFace[FACE_COUNT]; @@ -337,6 +337,7 @@ protected: F32 mWind; bool mInitialized; + bool mNeedUpdate; //flag to mark update being necessary (input has changed) bool mForceUpdate; //flag to force instantaneous update of cubemap LLVector3 mLastSunLightingDirection; LLVector3 mLastMoonLightingDirection; -- cgit v1.2.3 From fd4a90858c9beb147eb312f3c41396435d389c4d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 28 Aug 2019 21:51:22 +0300 Subject: SL-11776 [EEP] Reduced frequency of sky updates by comparing data fuzzily --- indra/newview/llvosky.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index b1a01a9366..fc577ab5f8 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -302,7 +302,7 @@ protected: void updateDirections(void); void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile, LLSkyTex* tex, bool is_shiny = false); + void createSkyTexture(AtmosphericsVars& vars, const S32 side, const S32 tile); LLPointer mSunTexturep[2]; LLPointer mMoonTexturep[2]; -- cgit v1.2.3 From b71e33b48cf321bb76081baeb210511cb9fbc1c8 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 25 Feb 2020 13:08:01 -0800 Subject: SL-12574 Cleanup unused argument --- indra/newview/llvosky.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.h') diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index fc577ab5f8..39e42bbb24 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -78,7 +78,7 @@ protected: void initEmpty(const S32 tex); - void create(F32 brightness); + void create(); void setDir(const LLVector3 &dir, const S32 i, const S32 j) { -- cgit v1.2.3