summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-07-17 15:06:23 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-07-17 15:06:23 -0700
commit040050af19ff7b5b2f5dc5ce5c4b68cfbb7e492a (patch)
treefcde4fb3af978615315f83204e6d7351f3b5f02c /indra/newview/app_settings
parentf7f9601567ce089f3335407f1d3c7d32dbb18c60 (diff)
parentf975cfd7361729195f2bb14d874e5eacc6140759 (diff)
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/settings.xml90
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyF.glsl1
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/previewV.glsl24
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl12
7 files changed, 121 insertions, 25 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 270d5e6869..f5e7f865ab 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9351,6 +9351,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>RenderPostProcessingHDR</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable HDR for post processing buffer</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderMaxOpenGLVersion</key>
<map>
<key>Comment</key>
@@ -10166,6 +10177,17 @@
<key>Value</key>
<integer>9</integer>
</map>
+ <key>RenderGlowHDR</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable HDR for glow map</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderGlowStrength</key>
<map>
<key>Comment</key>
@@ -10214,6 +10236,17 @@
<key>Value</key>
<real>1.3</real>
</map>
+ <key>RenderGlowNoise</key>
+ <map>
+ <key>Comment</key>
+ <string>Enables glow noise (dithering). Reduces banding from glow in certain cases.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <real>1</real>
+ </map>
<key>DisableAllRenderTypes</key>
<map>
<key>Comment</key>
@@ -10601,27 +10634,38 @@
<key>Value</key>
<integer>3</integer>
</map>
- <key>RenderSkyHDRScale</key>
+ <key>RenderSkyAutoAdjustLegacy</key>
<map>
<key>Comment</key>
- <string>Amount to over-brighten sun for HDR effect during the day</string>
+ <string>If true, automatically adjust legacy skies (those without a probe ambiance value) to take advantage of probes and HDR. This is the "opt-out" button for HDR and tonemapping when coupled with a sky setting that predates PBR.</string>
<key>Persist</key>
- <integer>0</integer>
+ <integer>1</integer>
<key>Type</key>
- <string>F32</string>
+ <string>Boolean</string>
<key>Value</key>
- <real>1.0</real>
+ <integer>1</integer>
</map>
- <key>RenderSkyAutoAdjustLegacy</key>
+ <key>RenderSkyAutoAdjustAmbientScale</key>
<map>
<key>Comment</key>
- <string>If true, automatically adjust legacy skies (those without a probe ambiance value) to take advantage of probes and HDR. This is the "opt-out" button for HDR and tonemapping when coupled with a sky setting that predates PBR.</string>
+ <string>Amount to scale ambient when auto-adjusting legacy skies</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>Boolean</string>
+ <string>F32</string>
<key>Value</key>
+ <real>0.5</real>
+ </map>
+ <key>RenderSkyAutoAdjustHDRScale</key>
+ <map>
+ <key>Comment</key>
+ <string>HDR Scale value to use when auto-adjusting legacy skies</string>
+ <key>Persist</key>
<integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>2.0</real>
</map>
<key>RenderReflectionProbeMaxLocalLightAmbiance</key>
<map>
@@ -10643,7 +10687,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>0.4</real>
+ <real>0.5</real>
</map>
<key>RenderShaderLODThreshold</key>
<map>
@@ -13127,13 +13171,13 @@
<key>TranslationService</key>
<map>
<key>Comment</key>
- <string>Translation API to use. (google|bing)</string>
+ <string>Translation API to use. (google|azure)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>bing</string>
+ <string>azure</string>
</map>
<key>GoogleTranslateAPIKey</key>
<map>
@@ -13149,7 +13193,7 @@
<key>BingTranslateAPIKey</key>
<map>
<key>Comment</key>
- <string>Bing AppID to use with the Microsoft Translator API</string>
+ <string>(Deprecated) Bing AppID to use with the Microsoft Translator API</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -13157,6 +13201,28 @@
<key>Value</key>
<string></string>
</map>
+ <key>AzureTranslateAPIKey</key>
+ <map>
+ <key>Comment</key>
+ <string>Azure Translation service data to use with the MS Azure Translator API</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>LLSD</string>
+ <key>Value</key>
+ <string></string>
+ </map>
+ <key>DeepLTranslateAPIKey</key>
+ <map>
+ <key>Comment</key>
+ <string>DeepL Translation service data to use with the DeepL Translator API</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>LLSD</string>
+ <key>Value</key>
+ <string></string>
+ </map>
<key>TutorialURL</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
index e0e97bb938..f6870c3ff0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
@@ -110,7 +110,7 @@ void main()
// Combine
vec3 color;
color = (cloudColorSun*(1.-alpha2) + cloudColorAmbient);
- color.rgb= max(vec3(0), color.rgb);
+ color.rgb = clamp(color.rgb, vec3(0), vec3(1));
color.rgb *= 2.0;
/// Gamma correct for WL (soft clip effect).
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index cc4c3b5dce..9d9ba49d82 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -84,6 +84,7 @@ void main()
color.rgb += rainbow(optic_d);
color.rgb += halo_22;
color.rgb *= 2.;
+ color.rgb = clamp(color.rgb, vec3(0), vec3(5));
frag_data[0] = vec4(0);
frag_data[1] = vec4(0);
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
index 7a5e14566b..b5437d43d2 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
@@ -28,6 +28,10 @@
out vec4 frag_color;
uniform sampler2D diffuseMap;
+#if HAS_NOISE
+uniform sampler2D glowNoiseMap;
+uniform vec2 screen_res;
+#endif
uniform float minLuminance;
uniform float maxExtractAlpha;
uniform vec3 lumWeights;
@@ -44,7 +48,16 @@ void main()
float lum = smoothstep(minLuminance, minLuminance+1.0, dot(col.rgb, lumWeights ) );
float warmth = smoothstep(minLuminance, minLuminance+1.0, max(col.r * warmthWeights.r, max(col.g * warmthWeights.g, col.b * warmthWeights.b)) );
- frag_color.rgb = col.rgb;
+#if HAS_NOISE
+ float TRUE_NOISE_RES = 128; // See mTrueNoiseMap
+ // *NOTE: Usually this is vary_fragcoord not vary_texcoord0, but glow extraction is in screen space
+ vec3 glow_noise = texture(glowNoiseMap, vary_texcoord0.xy * (screen_res / TRUE_NOISE_RES)).xyz;
+ // Dithering. Reduces banding effects in the reduced precision glow buffer.
+ float NOISE_DEPTH = 64.0;
+ col.rgb += glow_noise / NOISE_DEPTH;
+ col.rgb = max(col.rgb, vec3(0));
+#endif
+ frag_color.rgb = col.rgb;
frag_color.a = max(col.a, mix(lum, warmth, warmthAmount) * maxExtractAlpha);
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
index b474a5803f..f51b0f4d9e 100644
--- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
@@ -25,7 +25,6 @@
uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
-uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
in vec3 position;
@@ -54,14 +53,27 @@ float calcDirectionalLight(vec3 n, vec3 l)
//====================================================================================================
+#ifdef HAS_SKIN
+mat4 getObjectSkinnedTransform();
+uniform mat4 modelview_matrix;
+uniform mat4 projection_matrix;
+#endif
+
void main()
{
- //transform vertex
- vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0));
- gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ vec3 norm;
+#ifdef HAS_SKIN
+ mat4 mat = getObjectSkinnedTransform();
+ mat = modelview_matrix * mat;
+ vec4 pos = mat * vec4(position.xyz, 1.0);
+ gl_Position = projection_matrix * pos;
+ norm = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz);
+#else
+ gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+ norm = normalize(normal_matrix * normal);
+#endif
+
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
-
- vec3 norm = normalize(normal_matrix * normal);
vec4 col = vec4(0,0,0,1);
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
index 48cf234aa0..41a848a14f 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
@@ -36,8 +36,6 @@ vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten)
{
light *= atten.r;
additive = srgb_to_linear(additive*2.0);
- // 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 *= sky_hdr_scale;
light += additive;
return light;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
index 298ddf92a7..adbf7abdd1 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
@@ -368,7 +368,8 @@ return texCUBE(envMap, ReflDirectionWS);
// dir - ray direction in clip space
// i - probe index in refBox/refSphere
// d - distance to nearest wall in clip space
-vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)
+// scale - scale of box, default 1.0
+vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d, float scale)
{
// Intersection with OBB convert to unit box space
// Transform in local unit parallax cube space (scaled and rotated)
@@ -379,7 +380,7 @@ vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)
d = 1.0-max(max(abs(PositionLS.x), abs(PositionLS.y)), abs(PositionLS.z));
- vec3 Unitary = vec3(1.0f, 1.0f, 1.0f);
+ vec3 Unitary = vec3(scale);
vec3 FirstPlaneIntersect = (Unitary - PositionLS) / RayLS;
vec3 SecondPlaneIntersect = (-Unitary - PositionLS) / RayLS;
vec3 FurthestPlane = max(FirstPlaneIntersect, SecondPlaneIntersect);
@@ -391,6 +392,11 @@ vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)
return IntersectPositionCS;
}
+vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)
+{
+ return boxIntersect(origin, dir, i, d, 1.0);
+}
+
void debugBoxCol(vec3 ro, vec3 rd, float t, vec3 p, inout vec4 col)
{
vec3 v = ro + rd * t;
@@ -539,7 +545,7 @@ vec3 tapIrradianceMap(vec3 pos, vec3 dir, out float w, out float dw, vec3 c, int
if (refIndex[i].w < 0)
{
float d = 0.0;
- v = boxIntersect(pos, dir, i, d);
+ v = boxIntersect(pos, dir, i, d, 3.0);
w = max(d, 0.001);
}
else