diff options
author | Rider Linden <rider@lindenlab.com> | 2018-07-19 20:35:00 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-07-19 20:35:00 +0000 |
commit | 881dc7f3aeaf52f8c2adff35ad723d904905cead (patch) | |
tree | 4766db9fe307a47254a2053019762d069bb235d5 | |
parent | 80f98daed9aaf74f2d6fa3da9c1525ebcd4293c2 (diff) | |
parent | e3ef7294775c59a8b96ee05b52bba8acc3f8bfa3 (diff) |
Merged in graham_linden/viewer-eep-graham (pull request #29)
MAINT-8876
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 1 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/moonF.glsl | 8 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl | 10 | ||||
-rw-r--r-- | indra/newview/llfloatermyenvironment.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llvosky.cpp | 29 | ||||
-rw-r--r-- | indra/newview/llvosky.h | 2 |
6 files changed, 23 insertions, 31 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 212e27477b..ed65b1e45f 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -2784,7 +2784,6 @@ void LLScrollListCtrl::onClickColumn(void *userdata) } // if this column is the primary sort key, reverse the direction - sort_column_t cur_sort_column; if (!parent->mSortColumns.empty() && parent->mSortColumns.back().first == column_index) { ascending = !parent->mSortColumns.back().second; diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl index 6562b86aaf..2bfc4f3d2f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl @@ -28,9 +28,9 @@ /*[EXTRA_CODE_HERE]*/ #ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; +out vec4 frag_data[3]; #else -#define frag_color gl_FragColor +#define frag_data gl_FragData #endif vec3 fullbrightAtmosTransport(vec3 light); @@ -59,6 +59,8 @@ void main() // and shows true moon color at night vec3 luma_weights = vec3(0.1, 0.3, 0.0); float mix = 1.0f - dot(sunlight_color.rgb, luma_weights); - frag_color = vec4(c.rgb, mix * c.a); + frag_data[0] = vec4(c.rgb, mix * c.a); + frag_data[1] = vec4(0.0); + frag_data[2] = vec4(0.0f); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl index d2e3be2720..bbc5049f1c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/sunDiscF.glsl @@ -28,9 +28,9 @@ /*[EXTRA_CODE_HERE]*/ #ifdef DEFINE_GL_FRAGCOLOR -out vec4 frag_color; +out vec4 frag_data[3]; #else -#define frag_color gl_FragColor +#define frag_data gl_FragData #endif vec3 fullbrightAtmosTransport(vec3 light); @@ -46,10 +46,12 @@ void main() vec4 sunDiscA = texture2D(diffuseMap, vary_texcoord0.xy); vec4 sunDiscB = texture2D(altDiffuseMap, vary_texcoord0.xy); vec4 c = mix(sunDiscB, sunDiscA, blend_factor); - + c.rgb = clamp(c.rgb, vec3(0), vec3(1)); c.rgb = pow(c.rgb, vec3(0.7f)); c.rgb = fullbrightAtmosTransport(c.rgb); c.rgb = fullbrightScaleSoftClip(c.rgb); - frag_color = c; + frag_data[0] = c; + frag_data[1] = vec4(0.0f); + frag_data[2] = vec4(0.0, 1.0, 0.0, 1.0); } diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index a42a356c49..62c9997ebf 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -157,9 +157,9 @@ LLFloaterMyEnvironment::LLFloaterMyEnvironment(const LLSD& key) : mSelectedAsset() { mCommitCallbackRegistrar.add(ACTION_DOCREATE, [this](LLUICtrl *, const LLSD &userdata) { onDoCreate(userdata); }); - mCommitCallbackRegistrar.add(ACTION_DOEDIT, [this](LLUICtrl *, const LLSD &userdata) {}); + mCommitCallbackRegistrar.add(ACTION_DOEDIT, [this](LLUICtrl *, const LLSD &userdata) {(void)this;}); mCommitCallbackRegistrar.add(ACTION_DOAPPLY, [this](LLUICtrl *, const LLSD &userdata) { onDoApply(userdata.asString()); }); - mCommitCallbackRegistrar.add(ACTION_COPYPASTE, [this](LLUICtrl *, const LLSD &userdata) {}); + mCommitCallbackRegistrar.add(ACTION_COPYPASTE, [this](LLUICtrl *, const LLSD &userdata) {(void)this;}); mEnableCallbackRegistrar.add(ENABLE_ACTION, [this](LLUICtrl *, const LLSD &userdata) { return canAction(userdata.asString()); }); mEnableCallbackRegistrar.add(ENABLE_CANAPPLY, [this](LLUICtrl *, const LLSD &userdata) { return canApply(userdata.asString()); }); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 1b1c167410..899da3e420 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -423,7 +423,7 @@ void LLVOSky::init() for (S32 tile = 0; tile < NUM_TILES; ++tile) { initSkyTextureDirs(side, tile); - createSkyTexture(side, tile, false); + createSkyTexture(side, tile); } } @@ -548,7 +548,7 @@ void LLVOSky::initSkyTextureDirs(const S32 side, const S32 tile) } } -void LLVOSky::createSkyTexture(const S32 side, const S32 tile, bool use_windlight_shaders) +void LLVOSky::createSkyTexture(const S32 side, const S32 tile) { S32 tile_x = tile % NUM_TILES_X; S32 tile_y = tile / NUM_TILES_X; @@ -561,10 +561,7 @@ void LLVOSky::createSkyTexture(const S32 side, const S32 tile, bool use_windligh { for (x = tile_x_pos; x < (tile_x_pos + sTileResX); ++x) { - if (use_windlight_shaders) - { - mSkyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(mSkyTex[side].getDir(x, y)), x, y); - } + mSkyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(mSkyTex[side].getDir(x, y)), x, y); mShinyTex[side].setPixel(m_legacyAtmospherics.calcSkyColorInDir(mSkyTex[side].getDir(x, y), true), x, y); } } @@ -647,8 +644,6 @@ bool LLVOSky::updateSky() mForceUpdate = mForceUpdate || color_changed; mForceUpdate = mForceUpdate || !mInitialized; - bool use_windlight_shaders = gPipeline.canUseWindLightShaders(); - if (mForceUpdate && forceupdThrottle.hasExpired()) { LL_RECORD_BLOCK_TIME(FTM_VOSKY_UPDATEFORCED); @@ -671,7 +666,7 @@ bool LLVOSky::updateSky() { for (int tile = 0; tile < NUM_TILES; tile++) { - createSkyTexture(side, tile, use_windlight_shaders); + createSkyTexture(side, tile); } } @@ -679,13 +674,10 @@ bool LLVOSky::updateSky() { LLImageRaw* raw1 = nullptr; LLImageRaw* raw2 = nullptr; - if (use_windlight_shaders) - { - raw1 = mSkyTex[side].getImageRaw(TRUE); - raw2 = mSkyTex[side].getImageRaw(FALSE); - raw2->copy(raw1); - mSkyTex[side].createGLImage(mSkyTex[side].getWhich(FALSE)); - } + raw1 = mSkyTex[side].getImageRaw(TRUE); + raw2 = mSkyTex[side].getImageRaw(FALSE); + raw2->copy(raw1); + mSkyTex[side].createGLImage(mSkyTex[side].getWhich(FALSE)); raw1 = mShinyTex[side].getImageRaw(TRUE); raw2 = mShinyTex[side].getImageRaw(FALSE); @@ -697,10 +689,7 @@ bool LLVOSky::updateSky() // update the sky texture for (S32 i = 0; i < 6; ++i) { - if (use_windlight_shaders) - { - mSkyTex[i].create(1.0f); - } + mSkyTex[i].create(1.0f); mShinyTex[i].create(1.0f); } 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<LLViewerFetchedTexture> mSunTexturep[2]; LLPointer<LLViewerFetchedTexture> mMoonTexturep[2]; |