diff options
Diffstat (limited to 'indra')
27 files changed, 128 insertions, 117 deletions
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 17b1f4cf5c..71caff1686 100644 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -536,7 +536,7 @@ void LLTextureEntry::setGLTFMaterial(LLGLTFMaterial* material, bool local_origin // whether or not mGLTFMaterial is null, any existing override should have been cleared // before calling setGLTFMaterial // NOTE: if you're hitting this assert, try to make sure calling code is using LLViewerObject::setRenderMaterialID - llassert(!local_origin || getGLTFMaterialOverride() == nullptr || getGLTFMaterialOverride()->isClearedForBaseMaterial()); + //llassert(!local_origin || getGLTFMaterialOverride() == nullptr || getGLTFMaterialOverride()->isClearedForBaseMaterial()); if (mGLTFMaterial) { diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 61a17e5f52..d27528296f 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1099,7 +1099,8 @@ S32 LLGLSLShader::bindTexture(S32 uniform, LLRenderTarget* texture, bool depth, if (uniform > -1) { - gGL.getTexUnit(uniform)->bindManual(texture->getUsage(), texture->getTexture(0)); + bool has_mips = mode == LLTexUnit::TFO_TRILINEAR || mode == LLTexUnit::TFO_ANISOTROPIC; + gGL.getTexUnit(uniform)->bindManual(texture->getUsage(), texture->getTexture(0), has_mips); gGL.getTexUnit(uniform)->setTextureFilteringOption(mode); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7d15214ccb..3d8cbc9527 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10358,17 +10358,6 @@ <key>Value</key> <integer>128</integer> </map> - <key>RenderTonemapper</key> - <map> - <key>Comment</key> - <string>Which tone mapping function to use (0 - Linear, 1 - ACES Narkowicz, 2 - ACES Hill)</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>U32</string> - <key>Value</key> - <real>2</real> - </map> <key>RenderExposure</key> <map> <key>Comment</key> @@ -10456,7 +10445,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>3.0</real> + <real>1.25</real> </map> <key>RenderReflectionProbeMaxLocalLightAmbiance</key> <map> @@ -10478,7 +10467,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.125</real> + <real>0.6</real> </map> <key>RenderDynamicExposureMax</key> <map> @@ -10489,7 +10478,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>1.3</real> + <real>1.5</real> </map> <key>RenderDynamicExposureCoefficient</key> <map> @@ -10500,7 +10489,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.175</real> + <real>0.3</real> </map> <key>RenderShaderLODThreshold</key> <map> diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl index 7ed8e4c8ce..81f1e9aed0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl @@ -48,8 +48,11 @@ void main() vec2 tc = vec2(0.5,0.5); float L = textureLod(emissiveRect, tc, 8).r; - - float s = clamp(dynamic_exposure_params.x/L, dynamic_exposure_params.y, dynamic_exposure_params.z); + float max_L = dynamic_exposure_params.x; + L = clamp(L, 0.0, max_L); + L /= max_L; + L = pow(L, 2.0); + float s = mix(dynamic_exposure_params.z, dynamic_exposure_params.y, L); float prev = texture(exposureMap, vec2(0.5,0.5)).r; diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index b5eae3a1d5..11532135dd 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -42,6 +42,7 @@ vec4 applyWaterFogView(vec3 pos, vec4 color); #endif vec3 srgb_to_linear(vec3 cs); +vec3 legacy_adjust(vec3 c); vec3 linear_to_srgb(vec3 cl); vec3 fullbrightAtmosTransport(vec3 light); @@ -87,6 +88,7 @@ void main() #endif #ifndef IS_HUD + color.rgb = legacy_adjust(color.rgb); color.rgb = srgb_to_linear(color.rgb); color.rgb = fullbrightAtmosTransport(color.rgb); diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl index e63e666778..e0eb91480e 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl @@ -44,9 +44,9 @@ float lum(vec3 col) void main() { vec2 tc = vary_fragcoord*0.6+0.2; + tc.y -= 0.1; vec3 c = texture(diffuseRect, tc).rgb + texture(emissiveRect, tc).rgb; float L = lum(c); - frag_color = vec4(L); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl index ae6bdbba95..de766d6bc7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl @@ -105,29 +105,21 @@ vec3 toneMapACES_Hill(vec3 color) uniform float exposure; uniform float gamma; +vec3 legacy_adjust_post(vec3 c); + vec3 toneMap(vec3 color, float gs) { float exp_scale = texture(exposureMap, vec2(0.5,0.5)).r; color *= exposure * exp_scale * gs; -#ifdef TONEMAP_ACES_NARKOWICZ - color = toneMapACES_Narkowicz(color); -#endif - -#ifdef TONEMAP_ACES_HILL color = toneMapACES_Hill(color); -#endif -#ifdef TONEMAP_ACES_HILL_EXPOSURE_BOOST - // boost exposure as discussed in https://github.com/mrdoob/three.js/pull/19621 - // this factor is based on the exposure correction of Krzysztof Narkowicz in his - // implemetation of ACES tone mapping - color *= 1.0/0.6; - color = toneMapACES_Hill(color); -#endif + color = linear_to_srgb(color); - return linear_to_srgb(color); + color = legacy_adjust_post(color); + + return color; } //=============================================================== @@ -181,7 +173,7 @@ vec3 legacyGamma(vec3 color) float legacyGammaApprox() { - //TODO -- figure out how to plumb this in as a uniform + //TODO -- figure out how to plumb this in as a uniform float c = 0.5; float gc = 1.0-pow(c, gamma); diff --git a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl index 4a8b892c3a..a3b48e0898 100644 --- a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl @@ -72,7 +72,7 @@ vec3 rgb2hsv(vec3 c) vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); - float e = 1.0e-10; + float e = 1.0e-3; return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); } @@ -82,3 +82,30 @@ vec3 hsv2rgb(vec3 c) vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); } + +vec3 legacy_adjust_no_brighten(vec3 c) +{ + vec3 desat = rgb2hsv(c.rgb); + desat.g *= 0.75; + desat.rgb = hsv2rgb(desat); + return desat; +} + +vec3 legacy_adjust(vec3 c) +{ +#if 1 + vec3 desat = rgb2hsv(c.rgb); + desat.g *= 1.0-(1.0-desat.b)*0.5; + //desat.g = max(desat.g-0.1*c.b-0.1, 0.0); + desat.b += (1.0-desat.b)*0.1f; + desat.rgb = hsv2rgb(desat); + return desat; +#else + return c; +#endif +} + +vec3 legacy_adjust_post(vec3 c) +{ + return c; +} diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index 53552870ae..f4d6eff69e 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -77,6 +77,7 @@ vec4 applyWaterFogViewLinear(vec3 pos, vec4 color, vec3 sunlit); vec3 srgb_to_linear(vec3 c); vec3 linear_to_srgb(vec3 c); +vec3 legacy_adjust(vec3 c); vec2 encode_normal (vec3 n); vec3 atmosFragLightingLinear(vec3 light, vec3 additive, vec3 atten); @@ -239,6 +240,7 @@ void main() } diffuse_srgb.rgb *= vertex_color.rgb; + diffuse_srgb.rgb = legacy_adjust(diffuse_srgb.rgb); diffuse_linear.rgb = srgb_to_linear(diffuse_srgb.rgb); #endif // USE_VERTEX_COLOR diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl index 49ff49fdd8..e314555ef9 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl @@ -36,9 +36,9 @@ vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten) { light *= atten.r; additive = srgb_to_linear(additive*2.0); - // magic 3.0 here is to match the default RenderSkyHDRScale -- this parameter needs to be plumbed into sky settings or something + // magic 1.25 here is to match the default RenderSkyHDRScale -- this parameter needs to be plumbed into sky settings or something // so it's available to all shaders that call atmosFragLighting instead of just softenLightF.glsl - additive *= sun_up_factor*3.0 + 1.0; + additive *= sun_up_factor*1.25 + 1.0; light += additive; return light; } diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl index 14ce33f81f..22db9dce03 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl @@ -139,10 +139,8 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou // brightness of surface both sunlight and ambient - // fudge sunlit and amblit to get consistent lighting compared to legacy - // midday before PBR was a thing - sunlit = sunlight.rgb * (1.0+sun_up_factor*0.2); - amblit = tmpAmbient.rgb * 0.25; + sunlit = sunlight.rgb; + amblit = vec3(1,0,1); //should no longer be used, filled in by calcAtmosphericVarsLinear additive *= vec3(1.0 - combined_haze); } @@ -172,7 +170,7 @@ void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, ou sunlit *= 2.0; // squash ambient to approximate whatever weirdness legacy atmospherics were doing - amblit = ambient_color * 0.5 * (1.0+sun_up_factor*0.3); + amblit = ambient_color; // * (1.0+sun_up_factor*0.3); amblit *= ambientLighting(norm, light_dir); amblit = srgb_to_linear(amblit); diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl index 23ba95949a..5a2924afe5 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl @@ -58,6 +58,7 @@ vec4 getNormalEnvIntensityFlags(vec2 screenpos, out vec3 n, out float envIntensi vec2 getScreenXY(vec4 clip); vec2 getScreenCoord(vec4 clip); vec3 srgb_to_linear(vec3 c); +vec3 legacy_adjust(vec3 c); // Util vec3 hue_to_rgb(float hue); @@ -131,6 +132,7 @@ void main() } else { + diffuse.rgb = legacy_adjust(diffuse.rgb); diffuse = srgb_to_linear(diffuse); spec.rgb = srgb_to_linear(spec.rgb); diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl index 30b7895157..33e5b2346c 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl @@ -83,6 +83,7 @@ vec3 getProjectedLightSpecularColor(vec3 pos, vec3 n); vec2 getScreenXY(vec4 clip); vec2 getScreenCoord(vec4 clip); vec3 srgb_to_linear(vec3 cs); +vec3 legacy_adjust(vec3 c); vec4 texture2DLodSpecular(vec2 tc, float lod); vec4 getPosition(vec2 pos_screen); @@ -182,7 +183,7 @@ void main() } else { - + diffuse = legacy_adjust(diffuse); diffuse = srgb_to_linear(diffuse); spec.rgb = srgb_to_linear(spec.rgb); diff --git a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl index 30b96ce8dc..471e5e7fd3 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl @@ -63,6 +63,7 @@ vec4 getPosition(vec2 pos_screen); vec2 getScreenXY(vec4 clip); vec2 getScreenCoord(vec4 clip); vec3 srgb_to_linear(vec3 c); +vec3 legacy_adjust(vec3 c); float getDepth(vec2 tc); vec3 pbrPunctual(vec3 diffuseColor, vec3 specularColor, @@ -121,7 +122,7 @@ void main() { discard; } - + diffuse = legacy_adjust(diffuse); diffuse = srgb_to_linear(diffuse); spec.rgb = srgb_to_linear(spec.rgb); diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index e1206cc844..8f5bd6141a 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -83,9 +83,12 @@ float getDepth(vec2 pos_screen); vec3 linear_to_srgb(vec3 c); vec3 srgb_to_linear(vec3 c); +vec3 legacy_adjust(vec3 c); uniform vec4 waterPlane; +uniform int cube_snapshot; + #ifdef WATER_FOG vec4 applyWaterFogViewLinear(vec3 pos, vec4 color); #endif @@ -207,12 +210,18 @@ void main() else if (!GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_ATMOS)) { //should only be true of WL sky, just port over base color value - color = srgb_to_linear(texture2D(emissiveRect, tc).rgb); - color *= sun_up_factor * sky_hdr_scale + 1.0; + color = texture2D(emissiveRect, tc).rgb; + color = srgb_to_linear(color); + if (sun_up_factor > 0) + { + color *= sky_hdr_scale + 1.0; + } } else { // legacy shaders are still writng sRGB to gbuffer + baseColor.rgb = legacy_adjust(baseColor.rgb); + baseColor.rgb = srgb_to_linear(baseColor.rgb); spec.rgb = srgb_to_linear(spec.rgb); diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl index 33ea2129cf..3d06bb27a5 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl @@ -91,6 +91,7 @@ vec3 getProjectedLightSpecularColor(vec3 pos, vec3 n); vec2 getScreenXY(vec4 clip_point); vec2 getScreenCoord(vec4 clip_point); vec3 srgb_to_linear(vec3 c); +vec3 legacy_adjust(vec3 c); vec4 texture2DLodSpecular(vec2 tc, float lod); vec4 getPosition(vec2 pos_screen); @@ -189,6 +190,7 @@ void main() } else { + diffuse = legacy_adjust(diffuse); diffuse = srgb_to_linear(diffuse); spec.rgb = srgb_to_linear(spec.rgb); diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 6557c2b351..9fe8b00071 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -812,7 +812,8 @@ const F64Seconds LLEnvironment::TRANSITION_SLOW(10.0f); const F64Seconds LLEnvironment::TRANSITION_ALTITUDE(5.0f); const LLUUID LLEnvironment::KNOWN_SKY_SUNRISE("01e41537-ff51-2f1f-8ef7-17e4df760bfb"); -const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("7819e136-b6af-2e32-9c85-0b94121bb359"); +const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("d0401f82-56b9-f3ef-c6aa-13b589f7fdad"); +const LLUUID LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY("6c83e853-e7f8-cad7-8ee6-5f31c453721c"); const LLUUID LLEnvironment::KNOWN_SKY_SUNSET("084e26cd-a900-28e8-08d0-64a9de5c15e2"); const LLUUID LLEnvironment::KNOWN_SKY_MIDNIGHT("8a01b97a-cb20-c1ea-ac63-f7ea84ad0090"); diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 64fd170e43..4383f54f25 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -61,6 +61,7 @@ public: static const LLUUID KNOWN_SKY_SUNRISE; static const LLUUID KNOWN_SKY_MIDDAY; + static const LLUUID KNOWN_SKY_LEGACY_MIDDAY; static const LLUUID KNOWN_SKY_SUNSET; static const LLUUID KNOWN_SKY_MIDNIGHT; diff --git a/indra/newview/llsculptidsize.cpp b/indra/newview/llsculptidsize.cpp index 9edd78bff0..3d5102902d 100644 --- a/indra/newview/llsculptidsize.cpp +++ b/indra/newview/llsculptidsize.cpp @@ -65,7 +65,7 @@ void LLSculptIDSize::inc(const LLDrawable *pdrawable, int sz) pair_iter_iter_BY_SCULPT_ID_t itLU = mSizeInfo.get<tag_BY_SCULPT_ID>().equal_range(sculptId); if (itLU.first == itLU.second) { //register - llassert(mSizeInfo.get<tag_BY_DRAWABLE>().end() == mSizeInfo.get<tag_BY_DRAWABLE>().find(pdrawable)); + //llassert(mSizeInfo.get<tag_BY_DRAWABLE>().end() == mSizeInfo.get<tag_BY_DRAWABLE>().find(pdrawable)); mSizeInfo.get<tag_BY_DRAWABLE>().insert(Info(pdrawable, sz, boost::make_shared<SizeSum>(sz), sculptId)); total_size = sz; } diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 6d54a3770c..b8357b3454 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -268,7 +268,7 @@ BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask) BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask) { mMouseDown = TRUE; - gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE, LLFloaterReg::instanceVisible("build")); + gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, LLFloaterReg::instanceVisible("build")); return TRUE; } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 59b566efb6..8973d1c099 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -656,7 +656,6 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderReflectionsEnabled", handleReflectionProbeDetailChanged); setting_setup_signal_listener(gSavedSettings, "RenderScreenSpaceReflections", handleReflectionProbeDetailChanged); setting_setup_signal_listener(gSavedSettings, "RenderShadowDetail", handleSetShaderChanged); - setting_setup_signal_listener(gSavedSettings, "RenderTonemapper", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderDeferredSSAO", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderPerformanceTest", handleRenderPerfTestChanged); setting_setup_signal_listener(gSavedSettings, "ChatFontSize", handleChatFontSizeChanged); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index c8e279c991..d0dd02426e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -79,6 +79,8 @@ #include <boost/bind.hpp> // for SkinFolder listener #include <boost/signals2.hpp> +extern BOOL gCubeSnapshot; + // *TODO: Consider enabling mipmaps (they have been disabled for a long time). Likely has a significant performance impact for tiled/high texture repeat media. Mip generation in a shader may also be an option if necessary. constexpr BOOL USE_MIPMAPS = FALSE; @@ -264,6 +266,7 @@ viewer_media_t LLViewerMedia::newMediaImpl( viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const std::string& previous_url, bool update_from_self) { + llassert(!gCubeSnapshot); // Try to find media with the same media ID viewer_media_t media_impl = getMediaImplFromTextureID(media_entry->getMediaID()); @@ -626,6 +629,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg) { LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA; //LL_RECORD_BLOCK_TIME(FTM_MEDIA_UPDATE); + llassert(!gCubeSnapshot); + // Enable/disable the plugin read thread LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread")); @@ -3003,6 +3008,7 @@ void LLViewerMediaImpl::updateImagesMediaStreams() LLViewerMediaTexture* LLViewerMediaImpl::updateMediaImage() { LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA; + llassert(!gCubeSnapshot); if (!mMediaSource) { return nullptr; // not ready for updating @@ -3558,6 +3564,8 @@ void LLViewerMediaImpl::calculateInterest() LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA; //LL_RECORD_BLOCK_TIME(FTM_MEDIA_CALCULATE_INTEREST); LLViewerMediaTexture* texture = LLViewerTextureManager::findMediaTexture( mTextureId ); + llassert(!gCubeSnapshot); + if(texture != NULL) { mInterest = texture->getMaxVirtualSize(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 89538b3bd5..e8b9a22c60 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8898,6 +8898,12 @@ class LLWorldEnvSettings : public view_listener_t LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT); defocusEnvFloaters(); } + else if (event_name == "legacy noon") + { + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY, LLEnvironment::TRANSITION_INSTANT); + LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT); + defocusEnvFloaters(); + } else if (event_name == "sunset") { LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNSET, LLEnvironment::TRANSITION_INSTANT); @@ -8966,6 +8972,10 @@ class LLWorldEnableEnvSettings : public view_listener_t { result = (skyid == LLEnvironment::KNOWN_SKY_MIDDAY); } + else if (event_name == "legacy noon") + { + result = (skyid == LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY); + } else if (event_name == "sunset") { result = (skyid == LLEnvironment::KNOWN_SKY_SUNSET); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 4c34c6f6e5..1fd536ceac 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -2555,20 +2555,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredPostGammaCorrectProgram.mFeatures.isDeferred = true; gDeferredPostGammaCorrectProgram.mShaderFiles.clear(); gDeferredPostGammaCorrectProgram.clearPermutations(); - U32 tonemapper = gSavedSettings.getU32("RenderTonemapper"); - if (tonemapper == 1) - { - gDeferredPostGammaCorrectProgram.addPermutation("TONEMAP_ACES_NARKOWICZ", "1"); - } - else if (tonemapper == 2) - { - gDeferredPostGammaCorrectProgram.addPermutation("TONEMAP_ACES_HILL_EXPOSURE_BOOST", "1"); - } - else - { - gDeferredPostGammaCorrectProgram.addPermutation("TONEMAP_LINEAR", "1"); - } - gDeferredPostGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); + gDeferredPostGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredNoTCV.glsl", GL_VERTEX_SHADER)); gDeferredPostGammaCorrectProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredGammaCorrect.glsl", GL_FRAGMENT_SHADER)); gDeferredPostGammaCorrectProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gDeferredPostGammaCorrectProgram.createShader(NULL, NULL); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e4ffa5b6b0..4266c16f94 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7336,13 +7336,13 @@ void LLPipeline::renderFinalize() mLastExposure.bindTexture(0, channel); } + static LLStaticHashedString dt("dt"); + static LLStaticHashedString noiseVec("noiseVec"); + static LLStaticHashedString dynamic_exposure_params("dynamic_exposure_params"); static LLCachedControl<F32> dynamic_exposure_coefficient(gSavedSettings, "RenderDynamicExposureCoefficient", 0.175f); static LLCachedControl<F32> dynamic_exposure_min(gSavedSettings, "RenderDynamicExposureMin", 0.125f); static LLCachedControl<F32> dynamic_exposure_max(gSavedSettings, "RenderDynamicExposureMax", 1.3f); - static LLStaticHashedString dt("dt"); - static LLStaticHashedString noiseVec("noiseVec"); - static LLStaticHashedString dynamic_exposure_params("dynamic_exposure_params"); gExposureProgram.uniform1f(dt, gFrameIntervalSeconds); gExposureProgram.uniform2f(noiseVec, ll_frand() * 2.0 - 1.0, ll_frand() * 2.0 - 1.0); gExposureProgram.uniform3f(dynamic_exposure_params, dynamic_exposure_coefficient, dynamic_exposure_min, dynamic_exposure_max); @@ -7370,7 +7370,7 @@ void LLPipeline::renderFinalize() gDeferredPostGammaCorrectProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, screenTarget(), false, LLTexUnit::TFO_POINT); - gDeferredPostGammaCorrectProgram.bindTexture(LLShaderMgr::EXPOSURE_MAP, &mExposureMap); + gDeferredPostGammaCorrectProgram.bindTexture(LLShaderMgr::EXPOSURE_MAP, &mExposureMap); gDeferredPostGammaCorrectProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, screenTarget()->getWidth(), screenTarget()->getHeight()); @@ -9466,6 +9466,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) set_current_projection(saved_proj); LLVector3 eye = camera.getOrigin(); + llassert(eye.isFinite()); //camera used for shadow cull/render LLCamera shadow_cam; @@ -9745,6 +9746,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) { //get perspective projection view[j] = view[j].inverse(); + //llassert(origin.isFinite()); glh::vec3f origin_agent(origin.mV); @@ -9752,7 +9754,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) view[j].mult_matrix_vec(origin_agent); eye = LLVector3(origin_agent.v); - + //llassert(eye.isFinite()); if (!hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot) { mShadowFrustOrigin[j] = eye; diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index 17875e9c19..16b965843d 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -712,42 +712,6 @@ value="2"/> </combo_box> - - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left="420" - name="RenderTonemapperText" - text_readonly_color="LabelDisabledColor" - top_delta="24" - width="128"> - Tonemapper: - </text> - <combo_box - control_name="RenderTonemapper" - height="18" - layout="topleft" - left_delta="130" - top_delta="0" - name="ToneMapper" - width="150"> - <combo_box.item - label="Linear" - name="0" - value="0"/> - <combo_box.item - label="ACES Narkowicz" - name="1" - value="1"/> - <combo_box.item - label="ACES Hill" - name="2" - value="2"/> - </combo_box> - <slider control_name="RenderExposure" decimal_digits="1" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index d77415877c..4a92bdc601 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -902,17 +902,27 @@ function="World.EnableEnvSettings" parameter="sunrise" /> </menu_item_check> - <menu_item_check - label="Midday" - name="Noon" - shortcut="control|shift|Y"> - <menu_item_check.on_click - function="World.EnvSettings" - parameter="noon" /> - <menu_item_check.on_check - function="World.EnableEnvSettings" - parameter="noon" /> - </menu_item_check> + <menu_item_check + label="Midday" + name="Noon" + shortcut="control|shift|Y"> + <menu_item_check.on_click + function="World.EnvSettings" + parameter="noon" /> + <menu_item_check.on_check + function="World.EnableEnvSettings" + parameter="noon" /> + </menu_item_check> + <menu_item_check + label="Midday (Legacy)" + name="legacy noon"> + <menu_item_check.on_click + function="World.EnvSettings" + parameter="legacy noon" /> + <menu_item_check.on_check + function="World.EnableEnvSettings" + parameter="legacy noon" /> + </menu_item_check> <menu_item_check label="Sunset" name="Sunset" |