summaryrefslogtreecommitdiffstats
path: root/debug.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2026-07-20 15:46:29 -0700
committeryum <yum.food.vr@gmail.com>2026-07-20 15:46:29 -0700
commit2808677625ebec6d9342363ba97af00a9c11bfcd (patch)
tree9eb038f9d5473740bd5908f3462bcbbc2be07a31 /debug.cginc
parent97d2731d0093529e612c39bf254bb197012a3b3d (diff)
Add tangent vector debug view
Diffstat (limited to 'debug.cginc')
-rw-r--r--debug.cginc2
1 files changed, 2 insertions, 0 deletions
diff --git a/debug.cginc b/debug.cginc
index f6c8f15..a3430de 100644
--- a/debug.cginc
+++ b/debug.cginc
@@ -12,6 +12,8 @@ float4 apply_debug_view(v2f i, Pbr pbr, LightData light_data, BrdfData bd,
#elif defined(_DEBUG_VIEW_OBJECT_SPACE_NORMALS)
float3 normalOS = normalize(mul((float3x3)unity_WorldToObject, pbr.normal));
return float4((normalOS + 1.0f) * 0.5f, 1);
+#elif defined(_DEBUG_VIEW_TANGENT_VECTORS)
+ return float4((i.tangent.xyz + 1.0f) * 0.5f, 1);
#elif defined(_DEBUG_VIEW_METALLIC_GLOSS)
return float4(pbr.metallic, pbr.smoothness, 0, 1);
#elif defined(_DEBUG_VIEW_HEIGHT)