summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-04-20 18:14:29 +0100
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-04-20 18:14:29 +0100
commit0d7fa932d579f3fb6140658db7efb01fcd8f5ceb (patch)
tree09ce964ef40613fc27976ca5c23759e9d1ff2764 /indra/newview
parent528ccdc97fae50f30b7606b8942ca953deec7c8a (diff)
Move class3 sky/cloud shaders to where they need to be to get picked up by ALM.
Modify autobuild.xml to use new libatmo w/ state save/restore fixes (addresses font render glitch). Put in nSight debug support.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml18
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/cloudsF.glsl (renamed from indra/newview/app_settings/shaders/class3/windlight/cloudsF.glsl)0
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl (renamed from indra/newview/app_settings/shaders/class3/windlight/cloudsV.glsl)0
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/skyF.glsl (renamed from indra/newview/app_settings/shaders/class3/windlight/skyF.glsl)6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/skyV.glsl (renamed from indra/newview/app_settings/shaders/class3/windlight/skyV.glsl)0
-rw-r--r--indra/newview/llappviewer.cpp1
-rw-r--r--indra/newview/llfasttimerview.cpp4
9 files changed, 25 insertions, 8 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 995855137f..c3097589ea 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8631,7 +8631,19 @@
<key>Value</key>
<integer>0</integer>
</map>
-
+ <key>RenderNsightDebugSupport</key>
+ <map>
+ <key>Comment</key>
+ <string>
+ Disable features which prevent nVidia nSight from being usable with SL. Requires restart.
+ </string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>RenderLocalLights</key>
<map>
<key>Comment</key>
@@ -12268,7 +12280,9 @@
<key>Comment</key>
<string>If TRUE, always load textures at full resolution (discard = 0)</string>
<key>Persist</key>
- <integer>1</integer>
+ <!-- we don't want this to be persistent as people who enable it with low GPU mem cards
+ can get into a situation where login becomes impossible -->
+ <integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index 46bf718270..4511237e4d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -1,5 +1,5 @@
/**
- * @file WLSkyF.glsl
+ * @file class1/deferred/skyF.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
index e2a2367626..2a0ca35278 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
@@ -1,5 +1,5 @@
/**
- * @file WLSkyF.glsl
+ * @file class2/windlight/skyF.glsl
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
diff --git a/indra/newview/app_settings/shaders/class3/windlight/cloudsF.glsl b/indra/newview/app_settings/shaders/class3/deferred/cloudsF.glsl
index 96c70651b1..96c70651b1 100644
--- a/indra/newview/app_settings/shaders/class3/windlight/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/cloudsF.glsl
diff --git a/indra/newview/app_settings/shaders/class3/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl
index c1dd45cd67..c1dd45cd67 100644
--- a/indra/newview/app_settings/shaders/class3/windlight/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/cloudsV.glsl
diff --git a/indra/newview/app_settings/shaders/class3/windlight/skyF.glsl b/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl
index 08b6ec3f97..0223f94e55 100644
--- a/indra/newview/app_settings/shaders/class3/windlight/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/skyF.glsl
@@ -38,7 +38,8 @@ uniform vec2 sun_size;
uniform sampler2D cloud_noise_texture;
uniform sampler2D transmittance_texture;
uniform sampler3D scattering_texture;
-uniform sampler3D mie_scattering_texture;
+uniform sampler3D single_mie_scattering_texture;
+uniform sampler2D irradiance_texture;
vec3 GetSolarLuminance();
vec3 GetSkyLuminance(vec3 camPos, vec3 view_dir, float shadow_length, vec3 sun_dir, out vec3 transmittance);
@@ -53,8 +54,6 @@ void main()
vec3 transmittance;
vec3 radiance = GetSkyLuminance(camPos, view_direction, 0.0f, sun_direction, transmittance);
- //radiance *= transmittance;
-
// If the view ray intersects the Sun, add the Sun radiance.
if (dot(view_direction, sun_direction) >= sun_size.y)
{
@@ -65,7 +64,6 @@ void main()
color = pow(color, vec3(1.0 / 2.2));
frag_color.rgb = color;
-
frag_color.a = 1.0;
}
diff --git a/indra/newview/app_settings/shaders/class3/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class3/deferred/skyV.glsl
index 52a7595379..52a7595379 100644
--- a/indra/newview/app_settings/shaders/class3/windlight/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/skyV.glsl
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 7e3bfe4b1b..f936cdc202 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -580,6 +580,7 @@ static void settings_to_globals()
LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize"));
LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile");
+ LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport");
LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic");
LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures");
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 9219dd0279..d42b0bf293 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -435,6 +435,9 @@ void LLFastTimerView::onClose(bool app_quitting)
void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch)
{
+ // disable use of glReadPixels which messes up nVidia nSight graphics debugging
+ if (!LLRender::sNsightDebugSupport)
+ {
//read result back into raw image
glReadPixels(0, 0, 1024, 512, GL_RGB, GL_UNSIGNED_BYTE, scratch->getData());
@@ -447,6 +450,7 @@ void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch
std::string out_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename);
result->save(out_file);
+ }
}
//static