summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2022-07-27 10:26:50 -0700
committerPtolemy <ptolemy@lindenlab.com>2022-07-27 10:26:50 -0700
commit6f204fcffbeb56dd96dd74806cb0a0405651c3b3 (patch)
tree59bec3be4e685777014bc5a54674d82e66318995 /indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
parentae2d4a1e1b9e19a6ac5a7354f56bd7b650e988a0 (diff)
SL-17762: PBR: Add defines for spot light debugging
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl24
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
index 09a8dbd4f1..e29e5d69a2 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl
@@ -28,7 +28,15 @@
/*[EXTRA_CODE_HERE]*/
-#define DEBUG_PBR_LIGHT_TYPE 0
+#define DEBUG_PBR_LIGHT_TYPE 0 // Ouput gray if PBR multiSpot lights object
+#define DEBUG_PBR_SPOT 0
+#define DEBUG_PBR_SPOT_DIFFUSE 0 // PBR diffuse lit
+#define DEBUG_PBR_SPOT_SPECULAR 0 // PBR spec lit
+
+#define DEBUG_SPOT_DIFFUSE 0
+#define DEBUG_SPOT_NL 0 // monochome area effected by light
+#define DEBUG_SPOT_SPEC_POS 0
+#define DEBUG_SPOT_REFLECTION 0
#ifdef DEFINE_GL_FRAGCOLOR
out vec4 frag_color;
@@ -247,7 +255,21 @@ void main()
}
}
}
+ #if DEBUG_SPOT_SPEC_POS
+ final_color = pos + ref * dot(pdelta, proj_n)/ds;
+ #endif
+ #if DEBUG_SPOT_REFLECTION
+ final_color = ref;
+ #endif
}
+
+#if DEBUG_SPOT_NL
+ final_color =vec3(nl);
+#endif
+#if DEBUG_SPOT_DIFFUSE
+ final_color = vec3(nl * dist_atten * noise);
+#endif
+
}
//not sure why, but this line prevents MATBUG-194