diff options
author | Graham Linden <graham@lindenlab.com> | 2019-02-26 14:51:02 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-02-26 14:51:02 -0800 |
commit | 6f820163ce3a42eb90edba6f3907952e7d83517c (patch) | |
tree | 5a44dcbc27ade1b67f872649c6c4d594b8d50d03 /indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | |
parent | 982b8cdef280469d6c04ce9886a8cadaf6d8350c (diff) |
SL-10566 part the first
Tie using deferred rendering in water reflection/distortion map generation to debug var again
(claw back some performance lost to doing post-deferred in water map generation).
Edit softenLightF for class1/class2 to make them comparable again.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index df0ff4e654..f570908b45 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -76,7 +76,16 @@ vec3 linear_to_srgb(vec3 c); vec2 encode_normal (vec3 n); vec3 scaleSoftClipFrag(vec3 l); vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten); + +#if defined(VERT_ATMOSPHERICS) +vec3 getSunlitColor(); +vec3 getAmblitColor(); +vec3 getAdditiveColor(); +vec3 getAtmosAttenuation(); +void calcAtmospherics(vec3 inPositionEye, float ambFactor); +#else void calcFragAtmospherics(vec3 inPositionEye, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive); +#endif float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen); @@ -174,7 +183,15 @@ void main() vec3 amblit; vec3 additive; vec3 atten; + +#if VERT_ATMOSPHERICS + sunlit = getSunlitColor(); + amblit = getAmblitColor(); + additive = getAdditiveColor(); + atten = getAtmosAttenuation(); +#else calcFragAtmospherics(pos.xyz, 1.0, sunlit, amblit, additive, atten); +#endif vec2 abnormal = encode_normal(norm.xyz); |