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/class1 | |
parent | ca6103f57c452c9e3bb23a94899725d4f7ca8197 (diff) |
Glossy reflections for projectors.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rwxr-xr-x | indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl | 6 | ||||
-rwxr-xr-x | indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl | 6 |
2 files changed, 6 insertions, 6 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; } } } |