diff options
author | Dave Parks <davep@lindenlab.com> | 2023-03-22 10:38:24 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-03-22 10:38:24 -0500 |
commit | 8c7c4c424d07e39191e827f441af406724829b50 (patch) | |
tree | 968b45bc2e92137664cde0c212cb62b739972c8f /indra/newview/app_settings/shaders/class3/deferred | |
parent | 084ef5173fb79644ce2fd3e640c241a05529db70 (diff) |
DRTVWR-559 Quality pass -- Fix sky banding, fix off-by-one-mip in reflection probes (thanks Rye), remove noiseMap from light shaders (removes speckles), make irradiance maps RGB16F instead of RGBA16. Use actual luminance for sky instead of max color component during irradiance map pass.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred')
5 files changed, 6 insertions, 15 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl index 7d8f9c218d..0fb30559d4 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl @@ -37,7 +37,6 @@ uniform sampler2D depthMap; uniform sampler2D diffuseRect; uniform sampler2D specularRect; uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl -uniform sampler2D noiseMap; uniform sampler2D lightFunc; uniform vec3 env_mat[3]; @@ -132,9 +131,6 @@ void main() } else { - - float noise = texture2D(noiseMap, tc).b; - diffuse = srgb_to_linear(diffuse); spec.rgb = srgb_to_linear(spec.rgb); @@ -154,7 +150,6 @@ void main() float fa = light_col[i].a; float dist_atten = calcLegacyDistanceAttenuation(dist, fa); - dist_atten *= noise; float lit = nl * dist_atten; diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl index 5ed8a75e0e..30b7895157 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl @@ -41,7 +41,6 @@ uniform sampler2D normalMap; uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl uniform samplerCube environmentMap; uniform sampler2D lightMap; -uniform sampler2D noiseMap; uniform sampler2D projectionMap; // rgba uniform sampler2D lightFunc; @@ -187,7 +186,6 @@ void main() diffuse = srgb_to_linear(diffuse); spec.rgb = srgb_to_linear(spec.rgb); - float noise = texture2D(noiseMap, tc).b; if (proj_tc.z > 0.0 && proj_tc.x < 1.0 && proj_tc.y < 1.0 && @@ -199,7 +197,7 @@ void main() if (nl > 0.0) { - lit = nl * dist_atten * noise; + lit = nl * dist_atten; dlit = getProjectedLightDiffuseColor( l_dist, proj_tc.xy ); @@ -209,7 +207,7 @@ void main() amb_da += (nl*0.5+0.5) /* * (1.0-shadow) */ * proj_ambiance; } - amb_rgb = getProjectedLightAmbiance( amb_da, dist_atten, lit, nl, noise, proj_tc.xy ); + amb_rgb = getProjectedLightAmbiance( amb_da, dist_atten, lit, nl, 1.0, proj_tc.xy ); final_color += diffuse.rgb * amb_rgb; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl index a6a2543915..bd06a680f5 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl @@ -656,7 +656,7 @@ void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, vec2 tc, vec3 pos, vec3 norm, float glossiness) { // TODO - don't hard code lods - float reflection_lods = max_probe_lod-1; + float reflection_lods = max_probe_lod; preProbeSample(pos); vec3 refnormpersp = reflect(pos.xyz, norm.xyz); diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index dfd1d47b3e..0e3ebd1534 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -211,7 +211,7 @@ 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(baseColor.rgb); + color = srgb_to_linear(texture2D(emissiveRect, tc).rgb); } else { diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl index 3d8b95b882..33ea2129cf 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl @@ -51,7 +51,6 @@ uniform sampler2D normalMap; uniform sampler2D emissiveRect; // PBR linear packed Occlusion, Roughness, Metal. See: pbropaqueF.glsl uniform samplerCube environmentMap; uniform sampler2D lightMap; -uniform sampler2D noiseMap; uniform sampler2D projectionMap; // rgba uniform sampler2D lightFunc; @@ -193,7 +192,6 @@ void main() diffuse = srgb_to_linear(diffuse); spec.rgb = srgb_to_linear(spec.rgb); - float noise = texture2D(noiseMap, tc).b; if (proj_tc.z > 0.0 && proj_tc.x < 1.0 && proj_tc.y < 1.0 && @@ -205,7 +203,7 @@ void main() if (nl > 0.0) { - lit = nl * dist_atten * noise; + lit = nl * dist_atten; dlit = getProjectedLightDiffuseColor( l_dist, proj_tc.xy ); @@ -214,7 +212,7 @@ void main() amb_da += (nl*0.5+0.5) /* * (1.0-shadow) */ * proj_ambiance; } - vec3 amb_rgb = getProjectedLightAmbiance( amb_da, dist_atten, lit, nl, noise, proj_tc.xy ); + vec3 amb_rgb = getProjectedLightAmbiance( amb_da, dist_atten, lit, nl, 1.0, proj_tc.xy ); final_color += diffuse.rgb*amb_rgb; #if DEBUG_LEG_LIGHT_TYPE final_color = vec3(0,0.5,0); |