summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-01-30 08:37:07 -0800
committerGraham Linden <graham@lindenlab.com>2019-01-30 08:37:07 -0800
commitacbc7f4cddd6ad999c2bc7690c10b85a414a8102 (patch)
tree8af15ec5456494dc71d9eba0927ca4d5abb8aeac /indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
parent38f69533780943b432edaac212475bea5fd013b6 (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/multiSpotLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl10
1 files changed, 3 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index 7438fac8fc..24804c3011 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -71,8 +71,7 @@ VARYING vec4 vary_fragcoord;
uniform vec2 screen_res;
uniform mat4 inv_proj;
-
-vec3 decode_normal (vec2 enc);
+vec3 getNorm(vec2 pos_screen);
vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
{
@@ -141,12 +140,9 @@ void main()
discard;
}
- vec3 norm = texture2DRect(normalMap, frag.xy).xyz;
- float envIntensity = norm.z;
+ float envIntensity = texture2DRect(normalMap. frag.xy).z;
+ vec3 norm = getNorm(frag.xy);
- norm = decode_normal(norm.xy);
-
- norm = normalize(norm);
float l_dist = -dot(lv, proj_n);
vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));