diff options
Diffstat (limited to 'indra/newview/app_settings')
7 files changed, 34 insertions, 49 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ffe2202a6d..a369b22ef1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12627,27 +12627,16 @@ <key>Value</key> <real>20.0</real> </map> - <key>TextureCameraMotionThreshold</key> + <key>TextureBiasDistanceScale</key> <map> <key>Comment</key> - <string>If the overall motion is lower than this value, textures will be loaded faster</string> + <string>When biasing textures to lower resolution due to lack of vram, weight to put on distance factor.</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.2</real> - </map> - <key>TextureCameraMotionBoost</key> - <map> - <key>Comment</key> - <string>Progressive discard level decrement when the camera is still</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>3</integer> + <real>8.0</real> </map> <key>TextureDecodeDisabled</key> <map> diff --git a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl index 1e640d95ae..929b4e17b1 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl @@ -35,7 +35,6 @@ out vec4 frag_color; uniform sampler2D diffuseRect; uniform sampler2D depthMap; -uniform sampler2D bloomMap; uniform float depth_cutoff; uniform float norm_cutoff; @@ -81,7 +80,6 @@ void main() sc = min(sc, max_cof); sc = max(sc, -max_cof); - vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy); - frag_color.rgb = diff.rgb + bloom.rgb; + frag_color.rgb = diff.rgb; frag_color.a = sc/max_cof*0.5+0.5; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl index a1cab87092..d41e0b202b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl @@ -59,9 +59,9 @@ ATTRIBUTE vec2 texcoord0; ATTRIBUTE vec4 tangent; ATTRIBUTE vec2 texcoord1; -VARYING vec3 vary_mat0; -VARYING vec3 vary_mat1; -VARYING vec3 vary_mat2; +out vec3 vary_tangent; +flat out float vary_sign; +out vec3 vary_normal; VARYING vec2 vary_texcoord1; #else @@ -111,24 +111,21 @@ void main() vec3 n = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz); #ifdef HAS_NORMAL_MAP vec3 t = normalize((mat*vec4(tangent.xyz+position.xyz,1.0)).xyz-pos.xyz); - vec3 b = cross(n, t)*tangent.w; - - vary_mat0 = vec3(t.x, b.x, n.x); - vary_mat1 = vec3(t.y, b.y, n.y); - vary_mat2 = vec3(t.z, b.z, n.z); + + vary_tangent = t; + vary_sign = tangent.w; + vary_normal = n; #else //HAS_NORMAL_MAP -vary_normal = n; + vary_normal = n; #endif //HAS_NORMAL_MAP #else //HAS_SKIN vec3 n = normalize(normal_matrix * normal); #ifdef HAS_NORMAL_MAP vec3 t = normalize(normal_matrix * tangent.xyz); - vec3 b = cross(n,t)*tangent.w; - //vec3 t = cross(b,n) * binormal.w; - - vary_mat0 = vec3(t.x, b.x, n.x); - vary_mat1 = vec3(t.y, b.y, n.y); - vary_mat2 = vec3(t.z, b.z, n.z); + + vary_tangent = t; + vary_sign = tangent.w; + vary_normal = n; #else //HAS_NORMAL_MAP vary_normal = n; #endif //HAS_NORMAL_MAP diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl index 383fcaa9a7..87324bca7f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl @@ -34,6 +34,7 @@ out vec4 frag_color; #endif uniform sampler2D diffuseRect; +uniform sampler2D emissiveRect; uniform vec2 screen_res; VARYING vec2 vary_fragcoord; @@ -180,7 +181,7 @@ vec3 legacyGamma(vec3 color) void main() { //this is the one of the rare spots where diffuseRect contains linear color values (not sRGB) - vec4 diff = texture2D(diffuseRect, vary_fragcoord); + vec4 diff = texture2D(diffuseRect, vary_fragcoord) + texture2D(emissiveRect, vary_fragcoord); diff.rgb = toneMap(diff.rgb); diff.rgb = legacyGamma(diff.rgb); diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl index a79f644aef..1b868aee8d 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredNoDoFF.glsl @@ -34,7 +34,6 @@ out vec4 frag_color; #endif uniform sampler2D diffuseRect; -uniform sampler2D bloomMap; uniform vec2 screen_res; VARYING vec2 vary_fragcoord; @@ -43,7 +42,6 @@ void main() { vec4 diff = texture2D(diffuseRect, vary_fragcoord.xy); - vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy); - frag_color = diff + bloom; + frag_color = diff; } diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl index 3ead2149f5..770c436ede 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl @@ -29,7 +29,6 @@ out vec4 frag_color; -uniform sampler2D emissiveRect; uniform sampler2D diffuseRect; uniform sampler2D depthMap; @@ -37,8 +36,7 @@ in vec2 tc; void main() { - frag_color = texture2D(emissiveRect, tc) + - texture2D(diffuseRect, tc); + frag_color = texture2D(diffuseRect, tc); gl_FragDepth = texture(depthMap, tc).r; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl index add1cb2a37..6e41df34a4 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl @@ -210,9 +210,9 @@ uniform float minimum_alpha; #endif #ifdef HAS_NORMAL_MAP -VARYING vec3 vary_mat0; -VARYING vec3 vary_mat1; -VARYING vec3 vary_mat2; +in vec3 vary_normal; +in vec3 vary_tangent; +flat in float vary_sign; VARYING vec2 vary_texcoord1; #else VARYING vec3 vary_normal; @@ -227,14 +227,17 @@ vec2 encode_normal(vec3 n); vec3 getNormal(inout float glossiness) { #ifdef HAS_NORMAL_MAP - vec4 norm = texture2D(bumpMap, vary_texcoord1.xy); - glossiness *= norm.a; - - norm.xyz = norm.xyz * 2 - 1; + vec4 vNt = texture2D(bumpMap, vary_texcoord1.xy); + glossiness *= vNt.a; + vNt.xyz = vNt.xyz * 2 - 1; + float sign = vary_sign; + vec3 vN = vary_normal; + vec3 vT = vary_tangent.xyz; + + vec3 vB = sign * cross(vN, vT); + vec3 tnorm = normalize( vNt.x * vT + vNt.y * vB + vNt.z * vN ); - return normalize(vec3(dot(norm.xyz,vary_mat0), - dot(norm.xyz,vary_mat1), - dot(norm.xyz,vary_mat2))); + return tnorm; #else return normalize(vary_normal); #endif @@ -316,6 +319,7 @@ void main() //forward rendering, output lit linear color diffcol.rgb = srgb_to_linear(diffcol.rgb); spec.rgb = srgb_to_linear(spec.rgb); + spec.a = glossiness; // pack glossiness into spec alpha for lighting functions vec3 pos = vary_position; |