diff options
author | Geenz <geenz@geenzo.com> | 2014-08-07 16:50:36 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2014-08-07 16:50:36 -0400 |
commit | 2ffa387560d26acdd90a32321f593036fa36c294 (patch) | |
tree | 2d03b7b5d164530ab0f9f0456628361242aff456 /indra/newview/app_settings/shaders/class2 | |
parent | ca6103f57c452c9e3bb23a94899725d4f7ca8197 (diff) |
Glossy reflections for projectors.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rwxr-xr-x | indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl | 8 | ||||
-rwxr-xr-x | indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl | 6 |
2 files changed, 7 insertions, 7 deletions
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; } } } |