From 8c1aefc17c710b55ed7a72bd9de14cbed58ccd31 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 6 Nov 2018 16:38:06 +0000 Subject: Remove scaleDownLight funcs and eliminate unused copy-pasted funcs in lighting shaders. Also fix terrain response to atmospherics shaders (was failing to apply ambient on low end even when atmospherics was on). --- .../app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl | 2 -- indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl | 2 -- 2 files changed, 4 deletions(-) (limited to 'indra/newview/app_settings/shaders/class3/lighting') diff --git a/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl index e043ac873e..7870d0516f 100644 --- a/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl +++ b/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl @@ -29,7 +29,6 @@ vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 vec3 atmosAmbient(vec3 light); vec3 atmosAffectDirectionalLight(float lightIntensity); vec3 atmosGetDiffuseSunlightColor(); -vec3 scaleDownLight(vec3 light); uniform vec4 light_position[8]; uniform vec3 light_attenuation[8]; @@ -52,7 +51,6 @@ vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[5].xyz, light_attenuation[5].x, light_attenuation[5].y, light_diffuse[5].rgb); col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[6].xyz, light_attenuation[6].x, light_attenuation[6].y, light_diffuse[6].rgb); col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[7].xyz, light_attenuation[7].x, light_attenuation[7].y, light_diffuse[7].rgb); - col.rgb = scaleDownLight(col.rgb); // Add windlight lights col.rgb += atmosAmbient(baseCol.rgb); diff --git a/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl index b5dcd2eba2..9842d9ba93 100644 --- a/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl +++ b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl @@ -29,7 +29,6 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa vec3 atmosAmbient(vec3 light); vec3 atmosAffectDirectionalLight(float lightIntensity); -vec3 scaleDownLight(vec3 light); uniform vec4 light_position[8]; uniform vec3 light_direction[8]; @@ -50,7 +49,6 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight) col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].z); col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].z); col.rgb += light_diffuse[1].rgb*calcDirectionalLight(norm, light_position[1].xyz); - col.rgb = scaleDownLight(col.rgb); // Add windlight lights col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz)); -- cgit v1.2.3