summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-07-07 19:06:19 -0700
committerPtolemy <ptolemy@lindenlab.com>2022-07-07 19:06:19 -0700
commitc40bf62f959f41df9bb7fbbccef4f2163e249813 (patch)
treed1a2eae11483244b56040ffdebf618f04e84c349 /indra/newview/app_settings/shaders/class3
parent2e8d2feb47e2375726e9d9f740592275e096f46a (diff)
SL-17703: PBR: Cleanup atmos debugging
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl49
1 files changed, 27 insertions, 22 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index 82aecdfce1..ac7b5938fd 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -75,11 +75,12 @@
// Atmospheric Lighting
#define DEBUG_PBR_AMBOCC 0 // Output: ambient occlusion
-#define DEBUG_PBR_DIRECT_AMBIENT 0 // Output: da
+#define DEBUG_PBR_DA_RAW 0 // Output: da pre pow()
+#define DEBUG_PBR_DA_POW 0 // Output: da post pow()
#define DEBUG_PBR_SUN_LIT 0 // Ouput: sunlit
#define DEBUG_PBR_SUN_CONTRIB 0 // Output: sun_contrib
#define DEBUG_PBR_SKY_ADDITIVE 0 // Output: additive
-#define DEBUG_PBR_SKY_ATTEN 0 // Output: atten
+#define DEBUG_PBR_SKY_ATTEN 0 // Output: greyscale atten.r
#define DEBUG_PBR_IOR 0 // Output: grayscale IOR
#define DEBUG_PBR_REFLECT0_BASE 0 // Output: black reflect0 default from ior
@@ -188,6 +189,9 @@ void main()
vec3 light_dir = (sun_up_factor == 1) ? sun_dir : moon_dir;
float da = clamp(dot(norm.xyz, light_dir.xyz), 0.0, 1.0);
+#if DEBUG_PBR_DA_RAW
+ float debug_da = da;
+#endif
float light_gamma = 1.0 / 1.3;
da = pow(da, light_gamma);
@@ -450,32 +454,33 @@ void main()
#if DEBUG_PBR_SPEC_WEIGHT
color.rgb = vec3(specWeight);
#endif
+ #if DEBUG_PBR_V2C_RAW
+ color.rgb = v;
+ #endif
+ #if DEBUG_PBR_V2C_REMAP
+ color.rgb = v*0.5 + vec3(0.5);
+ #endif
-#if DEBUG_PBR_AMBOCC
+ #if DEBUG_PBR_AMBOCC
color.rgb = vec3(ambocc);
-#endif
-#if DEBUG_PBR_DIRECT_AMBIENT
+ #endif
+ #if DEBUG_PBR_DA_RAW
+ color.rgb = vec3(debug_da);
+ #endif
+ #if DEBUG_PBR_DA_POW
color.rgb = vec3(da);
-#endif
-#if DEBUG_PBR_SKY_ADDITIVE
+ #endif
+ #if DEBUG_PBR_SKY_ADDITIVE
color.rgb = additive;
-#endif
-#if DEBUG_PBR_SKY_ATTEN
- color.rgb = atten;
-#endif
-
-#if DEBUG_PBR_SUN_LIT
+ #endif
+ #if DEBUG_PBR_SKY_ATTEN
+ color.rgb = vec3(atten.r);
+ #endif
+ #if DEBUG_PBR_SUN_LIT
color.rgb = sunlit;
-color = srgb_to_linear(color);
-#endif
-#if DEBUG_PBR_SUN_CONTRIB
- color.rgb = sun_contrib;
-#endif
- #if DEBUG_PBR_V2C_RAW
- color.rgb = v;
#endif
- #if DEBUG_PBR_V2C_REMAP
- color.rgb = v*0.5 + vec3(0.5);
+ #if DEBUG_PBR_SUN_CONTRIB
+ color.rgb = sun_contrib;
#endif
frag_color.rgb = color.rgb; // PBR is done in linear
}