diff options
author | Graham Linden <graham@lindenlab.com> | 2019-01-30 08:37:07 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-01-30 08:37:07 -0800 |
commit | acbc7f4cddd6ad999c2bc7690c10b85a414a8102 (patch) | |
tree | 8af15ec5456494dc71d9eba0927ca4d5abb8aeac /indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl | |
parent | 38f69533780943b432edaac212475bea5fd013b6 (diff) |
SL-10415, SL-10434
Further tweaking of directional shadow sampling to balance between peter-panning and shadow acne.
Move stars to just this side of the sky some to reduce parallax.
Remove decodeNormF and uses of decode_normal in favor of unified use of getNorm
(try to help the Intel HD x000 compiler learn to link correctly).
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index f0b038cc93..9e0079e0e9 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -66,7 +66,7 @@ uniform vec2 screen_res; vec4 applyWaterFogView(vec3 pos, vec4 color); #endif -vec3 decode_normal (vec2 enc); +vec3 getNorm(vec2 pos_screen); vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten); vec3 fullbrightAtmosTransportFrag(vec3 l, vec3 additive, vec3 atten); void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten); @@ -78,14 +78,14 @@ vec4 getPositionWithDepth(vec2 pos_screen, float depth); void main() { - vec2 tc = vary_fragcoord.xy; - float depth = texture2DRect(depthMap, tc.xy).r; - vec4 pos = getPositionWithDepth(tc, depth); - vec4 norm = texture2DRect(normalMap, tc); - float envIntensity = norm.z; - norm.xyz = decode_normal(norm.xy); // unpack norm - - float da_sun = dot(norm.xyz, normalize(sun_dir.xyz)); + vec2 tc = vary_fragcoord.xy; + float depth = texture2DRect(depthMap, tc.xy).r; + vec4 pos = getPositionWithDepth(tc, depth); + vec4 norm = texture2DRect(normalMap, tc); + float envIntensity = norm.z; + norm.xyz = getNorm(tc); + + float da_sun = dot(norm.xyz, normalize(sun_dir.xyz)); float da_moon = dot(norm.xyz, normalize(moon_dir.xyz)); float da = max(da_sun, da_moon); |