summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2014-08-07 16:50:36 -0400
committerGeenz <geenz@geenzo.com>2014-08-07 16:50:36 -0400
commit2ffa387560d26acdd90a32321f593036fa36c294 (patch)
tree2d03b7b5d164530ab0f9f0456628361242aff456 /indra/newview/app_settings/shaders
parentca6103f57c452c9e3bb23a94899725d4f7ca8197 (diff)
Glossy reflections for projectors.
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl6
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl6
-rwxr-xr-xindra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl8
-rwxr-xr-xindra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl6
4 files changed, 13 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index c299d89455..63ad6fa7c7 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -314,16 +314,16 @@ void main()
stc /= stc.w;
if (stc.z > 0.0)
{
- float fatten = clamp(envIntensity*envIntensity+envIntensity*0.25, 0.25, 1.0);
+ float fatten = clamp(spec.a*spec.a+spec.a*0.25, 0.25, 1.0);
- stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
+ stc.xy = (stc.xy - vec2(0.5)) + vec2(0.5);
if (stc.x < 1.0 &&
stc.y < 1.0 &&
stc.x > 0.0 &&
stc.y > 0.0)
{
- col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, proj_lod).rgb * envIntensity;
+ col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, (1 - spec.a * spec.a) * (proj_lod * 0.5)).rgb * envIntensity;
}
}
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
index 5094513e52..6d282115dd 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
@@ -324,17 +324,17 @@ void main()
{
stc.xy /= stc.w;
- float fatten = clamp(envIntensity*envIntensity+envIntensity*0.5, 0.25, 1.0);
+ float fatten = clamp(spec.a*spec.a+spec.a*0.25, 0.25, 1.0);
//stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
- stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
+ stc.xy = (stc.xy - vec2(0.5)) + vec2(0.5);
if (stc.x < 1.0 &&
stc.y < 1.0 &&
stc.x > 0.0 &&
stc.y > 0.0)
{
- col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, proj_lod).rgb * envIntensity;
+ col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, (1 - spec.a * spec.a) * (proj_lod * 0.5)).rgb * envIntensity;
}
}
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index 2117056b6c..d5bc56e27a 100755
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -338,16 +338,16 @@ void main()
if (stc.z > 0.0)
{
- float fatten = clamp(envIntensity*envIntensity+envIntensity*0.25, 0.25, 1.0);
-
- stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
+ float fatten = clamp(spec.a*spec.a+spec.a*0.25, 0.25, 1.0);
+
+ stc.xy = (stc.xy - vec2(0.5)) + vec2(0.5);
if (stc.x < 1.0 &&
stc.y < 1.0 &&
stc.x > 0.0 &&
stc.y > 0.0)
{
- col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, proj_lod).rgb * shadow * envIntensity;
+ col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, (1 - spec.a * spec.a) * (proj_lod * 0.5)).rgb * shadow * envIntensity;
}
}
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index 08f5438e8a..56b01eff8c 100755
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -338,17 +338,17 @@ void main()
{
stc.xy /= stc.w;
- float fatten = clamp(envIntensity*envIntensity+envIntensity*0.5, 0.25, 1.0);
+ float fatten = clamp(spec.a*spec.a+spec.a*0.25, 0.25, 1.0);
//stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
- stc.xy = (stc.xy - vec2(0.5)) * fatten + vec2(0.5);
+ stc.xy = (stc.xy - vec2(0.5)) + vec2(0.5);
if (stc.x < 1.0 &&
stc.y < 1.0 &&
stc.x > 0.0 &&
stc.y > 0.0)
{
- col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, proj_lod).rgb * shadow * envIntensity;
+ col += color.rgb * texture2DLodSpecular(projectionMap, stc.xy, (1 - spec.a * spec.a) * (proj_lod * 0.5)).rgb * shadow * envIntensity;
}
}
}