diff options
author | Geenz <geenz@geenzo.com> | 2014-08-07 17:27:34 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2014-08-07 17:27:34 -0400 |
commit | 703be164cf4205117fa0e1adc9316fb77645ce25 (patch) | |
tree | cfde21b197327228e959b35bf4bd6555272b7d61 /indra/newview/app_settings | |
parent | 2ffa387560d26acdd90a32321f593036fa36c294 (diff) |
Code cleanup for BUG-6898
Diffstat (limited to 'indra/newview/app_settings')
4 files changed, 15 insertions, 15 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl index 63ad6fa7c7..62acbbf36b 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl @@ -311,12 +311,14 @@ void main() vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds; vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0)); - stc /= stc.w; + if (stc.z > 0.0) { - float fatten = clamp(spec.a*spec.a+spec.a*0.25, 0.25, 1.0); + stc /= stc.w; + + //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); + //stc.xy = (stc.xy - vec2(0.25)) * fatten + vec2(0.5); if (stc.x < 1.0 && stc.y < 1.0 && diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl index 6d282115dd..10b47291e3 100755 --- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl @@ -322,12 +322,11 @@ void main() if (stc.z > 0.0) { - stc.xy /= stc.w; + stc /= stc.w; - float fatten = clamp(spec.a*spec.a+spec.a*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); + //stc.xy = (stc.xy - vec2(0.25)) * fatten + vec2(0.5); if (stc.x < 1.0 && stc.y < 1.0 && diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl index d5bc56e27a..dd99c029e6 100755 --- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl @@ -334,13 +334,14 @@ void main() vec3 pfinal = pos + ref * dot(pdelta, proj_n)/ds; vec4 stc = (proj_mat * vec4(pfinal.xyz, 1.0)); - stc /= stc.w; if (stc.z > 0.0) { - float fatten = clamp(spec.a*spec.a+spec.a*0.25, 0.25, 1.0); + stc /= stc.w; - stc.xy = (stc.xy - vec2(0.5)) + vec2(0.5); + //float fatten = clamp(spec.a*spec.a+spec.a*0.25, 0.25, 1.0); + + //stc.xy = (stc.xy - vec2(0.25)) * fatten + vec2(0.5); if (stc.x < 1.0 && stc.y < 1.0 && @@ -352,7 +353,6 @@ void main() } } } - //not sure why, but this line prevents MATBUG-194 col = max(col, vec3(0.0)); diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index 56b01eff8c..acf474c489 100755 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -336,12 +336,11 @@ void main() if (stc.z > 0.0) { - stc.xy /= stc.w; + stc /= stc.w; - float fatten = clamp(spec.a*spec.a+spec.a*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); + //stc.xy = (stc.xy - vec2(0.25)) * fatten + vec2(0.5); if (stc.x < 1.0 && stc.y < 1.0 && |