diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-07-27 10:26:50 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-08-02 09:44:45 -0700 |
commit | 4c07a4a44553e29a5d54215119fcf056c62e45e8 (patch) | |
tree | 52cf5628979110c3cd9ab480969c2a8064d52f2c /indra/newview/app_settings/shaders/class3 | |
parent | c7d61c417b0e7c9b7f56e29b82476dfe85c39b91 (diff) |
SL-17762: PBR: Add defines for spot light debugging
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/multiSpotLightF.glsl | 24 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl | 5 |
2 files changed, 28 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 diff --git a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl index 72ae733622..f6ab0ad428 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/spotLightF.glsl @@ -29,6 +29,10 @@ /*[EXTRA_CODE_HERE]*/ #define DEBUG_PBR_LIGHT_TYPE 0 +#define DEBUG_PBR_SPOT 0 +#define DEBUG_PBR_NL 0 // monochome area effected by light +#define DEBUG_PBR_SPOT_DIFFUSE 0 +#define DEBUG_PBR_SPOT_SPECULAR 0 #ifdef DEFINE_GL_FRAGCOLOR out vec4 frag_color; @@ -142,6 +146,7 @@ void main() vec3 diffuse = texture2DRect(diffuseRect, tc).rgb; vec4 spec = texture2DRect(specularRect, tc); vec3 dlit = vec3(0, 0, 0); + vec3 slit = vec3(0, 0, 0); if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_PBR)) { |