diff options
Diffstat (limited to 'indra/newview/app_settings')
8 files changed, 52 insertions, 31 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d6af39f97e..5ffd610fba 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10367,7 +10367,7 @@ <key>Type</key> <string>U32</string> <key>Value</key> - <real>1</real> + <real>2</real> </map> <key>RenderExposure</key> <map> @@ -10403,18 +10403,17 @@ <key>Value</key> <real>0</real> </map> - <key>RenderReflectionProbeTextureHackID</key> + <key>RenderAutomaticReflectionProbes</key> <map> <key>Comment</key> - <string>HACK -- Any object with a diffuse texture with this ID will be treated as a user override reflection probe. (default is "Violet Info Hub" photo from Library)</string> + <string>Automatic reflection probes control. 0 - disable, 1 - Terrain/water only, 2- Terrain/water + objects. Requires restart.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> - <string>String</string> + <string>S32</string> <key>Value</key> - <string>6b186931-05da-eafa-a3ed-a012a33bbfb6</string> + <integer>2</integer> </map> - <key>RenderReflectionRes</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index eb3528b9b7..6b788dd78f 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -220,6 +220,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>FetchGroupChatHistory</key> + <map> + <key>Comment</key> + <string>Fetch recent messages from group chat servers when a group window opens</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>VoiceCallsFriendsOnly</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl index 689929fe38..861b78c961 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl @@ -36,17 +36,16 @@ uniform sampler2D exposureMap; uniform float dt; uniform vec2 noiseVec; -// calculate luminance the same way LLColor4::calcHSL does + float lum(vec3 col) { - float mx = max(max(col.r, col.g), col.b); - float mn = min(min(col.r, col.g), col.b); - return (mx + mn) * 0.5; + vec3 l = vec3(0.2126, 0.7152, 0.0722); + return dot(l, col); } void main() { - float step = 1.0/32.0; + float step = 1.0/16.0; float start = step; float end = 1.0-step; @@ -55,13 +54,13 @@ void main() vec3 col; - vec2 nz = noiseVec * step * 0.5; + //vec2 nz = noiseVec * step * 0.5; for (float x = start; x <= end; x += step) { for (float y = start; y <= end; y += step) { - vec2 tc = vec2(x,y) + nz; + vec2 tc = vec2(x,y); // + nz; vec3 c = texture(diffuseRect, tc).rgb + texture(emissiveRect, tc).rgb; float L = max(lum(c), 0.25); @@ -82,11 +81,13 @@ void main() float L = lum(col); - float s = clamp(0.1/L, 0.5, 4.0); + float s = clamp(0.175/L, 0.125, 1.3); + float prev = texture(exposureMap, vec2(0.5,0.5)).r; - s = mix(prev, s, min(dt*2.0, 0.04)); + s = mix(prev, s, min(dt*2.0*abs(prev-s), 0.04)); + frag_color = vec4(s, s, s, dt); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl index 7b4b62f0eb..bdbc0056f8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl @@ -124,7 +124,6 @@ vec3 toneMap(vec3 color) // this factor is based on the exposure correction of Krzysztof Narkowicz in his // implemetation of ACES tone mapping color *= 1.0/0.6; - //color /= 0.6; color = toneMapACES_Hill(color); #endif diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl index fc6291d438..0090155e5c 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl @@ -91,7 +91,7 @@ void main() vary_LightNormPosDot = rel_pos_lightnorm_dot; // Initialize temp variables - vec3 sunlight = (sun_up_factor == 1) ? sunlight_color*2.0 : moonlight_color*0.75; + vec3 sunlight = (sun_up_factor == 1) ? sunlight_color*2.0 : moonlight_color; // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl index 0d3dbf85e2..c2527db218 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl @@ -62,8 +62,10 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou vec3 rel_pos_norm = normalize(rel_pos); float rel_pos_len = length(rel_pos); - float scale = 2.0; - vec3 sunlight = (sun_up_factor == 1) ? sunlight_color * scale: moonlight_color*0.75; + + float scale = sun_up_factor + 1; + vec3 sunlight = (sun_up_factor == 1) ? sunlight_color: moonlight_color; + sunlight *= scale; // sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl index 7a5676e0ab..e73e396b8e 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl @@ -35,6 +35,8 @@ uniform sampler2D sceneMap; uniform int cube_snapshot; uniform float max_probe_lod; +#define MAX_REFMAP_COUNT 256 // must match LL_MAX_REFLECTION_PROBE_COUNT + layout (std140) uniform ReflectionProbes { // list of OBBs for user override probes @@ -42,18 +44,18 @@ layout (std140) uniform ReflectionProbes // for each box refBox[i]... /// box[0..2] - plane 0 .. 2 in [A,B,C,D] notation // box[3][0..2] - plane thickness - mat4 refBox[REFMAP_COUNT]; + mat4 refBox[MAX_REFMAP_COUNT]; // list of bounding spheres for reflection probes sorted by distance to camera (closest first) - vec4 refSphere[REFMAP_COUNT]; + vec4 refSphere[MAX_REFMAP_COUNT]; // extra parameters (currently only .x used for probe ambiance) - vec4 refParams[REFMAP_COUNT]; + vec4 refParams[MAX_REFMAP_COUNT]; // index of cube map in reflectionProbes for a corresponding reflection probe // e.g. cube map channel of refSphere[2] is stored in refIndex[2] // refIndex.x - cubemap channel in reflectionProbes // refIndex.y - index in refNeighbor of neighbor list (index is ivec4 index, not int index) // refIndex.z - number of neighbors // refIndex.w - priority, if negative, this probe has a box influence - ivec4 refIndex[REFMAP_COUNT]; + ivec4 refIndex[MAX_REFMAP_COUNT]; // neighbor list data (refSphere indices, not cubemap array layer) ivec4 refNeighbor[1024]; @@ -431,13 +433,15 @@ void boxIntersectDebug(vec3 origin, vec3 pos, int i, inout vec4 col) // dw - distance weight float sphereWeight(vec3 pos, vec3 dir, vec3 origin, float r, int i, out float dw) { - float r1 = r * 0.5; // 50% of radius (outer sphere to start interpolating down) + float r1 = r * 0.5; // 50% of radius (outer sphere to start interpolating down) vec3 delta = pos.xyz - origin; float d2 = max(length(delta), 0.001); float atten = 1.0 - max(d2 - r1, 0.0) / max((r - r1), 0.001); float w = 1.0 / d2; - + + w *= refParams[i].z; + dw = w * atten * max(r, 1.0)*4; w *= atten; @@ -674,7 +678,7 @@ void sampleReflectionProbesWater(inout vec3 ambenv, inout vec3 glossenv, sampleReflectionProbes(ambenv, glossenv, tc, pos, norm, glossiness); // fudge factor to get PBR water at a similar luminance ot legacy water - glossenv *= 0.25; + glossenv *= 0.4; } void debugTapRefMap(vec3 pos, vec3 dir, float depth, int i, inout vec4 col) diff --git a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl index 7524567f6b..9da86759c9 100644 --- a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl +++ b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl @@ -25,10 +25,10 @@ // class3/environment/waterF.glsl -#ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; -#else -#define frag_color gl_FragColor + +#ifdef HAS_SUN_SHADOW +float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen); #endif vec3 scaleSoftClipFragLinear(vec3 l); @@ -199,6 +199,12 @@ void main() vec3 additive; vec3 atten; + float shadow = 1.0f; + +#ifdef HAS_SUN_SHADOW + shadow = sampleDirectionalShadow(pos.xyz, norm.xyz, distort); +#endif + calcAtmosphericVarsLinear(pos.xyz, wavef, vary_light_dir, sunlit, amblit, additive, atten); vec3 sunlit_linear = srgb_to_linear(sunlit); @@ -241,7 +247,6 @@ void main() vec3 v = -normalize(pos.xyz); - float scol = 1.0; vec3 colorEmissive = vec3(0); float ao = 1.0; vec3 light_dir = transform_normal(lightDir); @@ -253,7 +258,7 @@ void main() vec3 punctual = pbrPunctual(vec3(0), specularColor, 0.1, metallic, normalize(wavef+up*max(dist, 32.0)/32.0*(1.0-vdu)), v, normalize(light_dir)); - vec3 color = punctual * sunlit_linear * 2.75 * scol; + vec3 color = punctual * sunlit_linear * 2.75 * shadow; vec3 ibl = pbrIbl(vec3(0), vec3(1), radiance, vec3(0), ao, NdotV, 0.0); |