diff options
author | Dave Parks <davep@lindenlab.com> | 2013-06-28 13:32:01 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-06-28 13:32:01 -0500 |
commit | 7df863265f6f536aeae84dceab9140fb4465213c (patch) | |
tree | 0c9adb2d4f7b684d803102664571a773572ed622 /indra/newview/app_settings/shaders/class1/objects/previewV.glsl | |
parent | 380785e613b9823cb6160be5678e5f01783fee5f (diff) |
NORSPEC-290 Shader optimization WIP -- remove a couple normalizes, pows, and divides from various lighting functions.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/objects/previewV.glsl')
-rwxr-xr-x | indra/newview/app_settings/shaders/class1/objects/previewV.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl index 7f3f84398b..c325a236d7 100755 --- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl +++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl @@ -91,8 +91,8 @@ void main() // Collect normal lights (need to be divided by two, as we later multiply by 2) col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz); - col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z); - col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z); + col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], 1.f/light_attenuation[2].x, light_attenuation[2].z); + col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], 1.f/light_attenuation[3].x, light_attenuation[3].z); vertex_color = col*color; } |