summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-07-07 19:07:00 -0700
committerPtolemy <ptolemy@lindenlab.com>2022-07-07 19:07:00 -0700
commitdaf3f4f7365137852f952f6fd2a484c81791165a (patch)
tree995f1753b411ed42326dd3649bfea56da5ae2aa1 /indra/newview/app_settings/shaders/class3/deferred
parentc40bf62f959f41df9bb7fbbccef4f2163e249813 (diff)
SL-17703: PBR: Add sun/moon to output
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index ac7b5938fd..822b3e473d 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -23,6 +23,7 @@
* $/LicenseInfo$
*/
+#define PBR_USE_ATMOS 1
#define PBR_USE_GGX_APPROX 1
#define PBR_USE_GGX_EMS_HACK 1
#define PBR_USE_IRRADIANCE_HACK 1
@@ -336,6 +337,14 @@ void main()
color.rgb = colorDiffuse + colorEmissive + colorSpec;
+ vec3 sun_contrib = min(da, scol) * sunlit;
+#if PBR_USE_ATMOS
+ color += sun_contrib;
+ color *= atten.r;
+ color += 0.5*additive;
+ color = scaleSoftClipFrag(color);
+#endif // PBR_USE_ATMOS
+
#if DEBUG_PBR_DIFFUSE
color.rgb = colorDiffuse;
#endif