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/class1/windlight/atmosphericsF.glsl | 10 ++++++---- .../shaders/class1/windlight/atmosphericsHelpersF.glsl | 6 ------ .../shaders/class1/windlight/atmosphericsHelpersV.glsl | 6 ------ 3 files changed, 6 insertions(+), 16 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/windlight') diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl index bf0a9048f0..c1cc3679a7 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl @@ -25,13 +25,14 @@ vec3 atmosFragAmbient(vec3 light, vec3 sunlit) { - return light; + /* stub function for fallback compatibility on class1 hardware */ + return light; } vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten) { - /* stub function for fallback compatibility on class1 hardware */ - return light; + /* stub function for fallback compatibility on class1 hardware */ + return light; } vec3 atmosFragAffectDirectionalLight(float light, vec3 sunlit) @@ -41,7 +42,8 @@ vec3 atmosFragAffectDirectionalLight(float light, vec3 sunlit) vec3 atmosLighting(vec3 light) { - return atmosFragLighting(light, vec3(0), vec3(1.0)); + /* stub function for fallback compatibility on class1 hardware */ + return light; } void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive) diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl index c16e3d50a2..9e5893d32a 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl @@ -41,9 +41,3 @@ vec3 atmosGetDiffuseSunlightColor() return sunlight_color.rgb; } -vec3 scaleDownLight(vec3 light) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl index 9f68ca3dfa..01f19087ff 100644 --- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl +++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl @@ -41,9 +41,3 @@ vec3 atmosGetDiffuseSunlightColor() return sunlight_color.rgb; } -vec3 scaleDownLight(vec3 light) -{ - /* stub function for fallback compatibility on class1 hardware */ - return light; -} - -- cgit v1.2.3