From f133be068a4aa23c02c47348f5c7d4a28e1d5c37 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 26 Apr 2019 16:02:21 -0700 Subject: Lighting WIP Consistency across class2/3/ALM lighting. --- .../app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl | 6 +++--- .../app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl | 3 +++ indra/newview/app_settings/shaders/class2/windlight/transportF.glsl | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings/shaders/class2/windlight') diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl index c80706d2a7..9f049cb8fb 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl @@ -35,10 +35,10 @@ vec3 getPositionEye(); uniform float scene_light_strength; uniform int no_atmo; -vec3 atmosAmbient(vec3 light) +vec3 atmosAmbient() { - if (no_atmo == 1) return light + vec3(0.66); - return getAmblitColor() + light / 2.0; + if (no_atmo == 1) return vec3(0.66); + return getAmblitColor(); } vec3 atmosAffectDirectionalLight(float lightIntensity) diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl index 9953f79cf2..ea37610502 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl @@ -32,14 +32,17 @@ vec3 getSunlitColor() { return vec3(0,0,0); } + vec3 getAmblitColor() { return vec3(0,0,0); } + vec3 getAdditiveColor() { return vary_AdditiveColor; } + vec3 getAtmosAttenuation() { return vec3(vary_AtmosAttenuation); diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl index 2e8946252b..9cb9c723a2 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl @@ -39,8 +39,8 @@ vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten) return light; } light *= atten.r; - light += additive * 2.0; - return light; + light += additive; + return light * 2.0; } vec3 atmosTransport(vec3 light) -- cgit v1.2.3