summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2019-04-09 22:35:40 -0700
committerGeenz <geenz@geenzo.com>2019-04-09 22:35:40 -0700
commitdcd8117b85f45886f78a1a2e9756cb1709d6572a (patch)
tree65d1b49cb3c3fbd1e0d4efad7c457a7598d25533 /indra/newview/app_settings/shaders/class2
parentf9c0b021ea1a695c0d5d4042981045fe265e7918 (diff)
First stab at moving atmospheric var calcs to its own utility shader.
Still some work to go here. Largely related to how certain values (i.e., SSAO mix values) are supplied. But so far, so good. --HG-- branch : OPEN-340
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 8814587fbc..4c7c50315f 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -72,6 +72,8 @@ vec3 atmosFragLighting(vec3 l, vec3 additive, vec3 atten);
vec3 fullbrightScaleSoftClipFrag(vec3 l, vec3 add, vec3 atten);
vec3 scaleSoftClipFrag(vec3 l);
+void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten);
+
vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
@@ -79,6 +81,8 @@ vec3 fullbrightShinyAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
vec4 getPositionWithDepth(vec2 pos_screen, float depth);
vec4 getPosition(vec2 pos_screen);
+vec3 nothing();
+
#ifdef WATER_FOG
vec4 applyWaterFogView(vec3 pos, vec4 color);
#endif
@@ -121,7 +125,7 @@ void main()
vec3 additive;
vec3 atten;
- calcFragAtmospherics(pos.xyz, ambocc, sunlit, amblit, additive, atten);
+ calcAtmosphericVars(pos.xyz, ambocc, sunlit, amblit, additive, atten);
float ambient = da;
ambient *= 0.5;