summaryrefslogtreecommitdiffstats
path: root/2ner.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-06-13 15:47:31 -0700
committeryum <yum.food.vr@gmail.com>2025-06-23 01:13:01 -0700
commit91f89f5cbeed39cfa02ce5c4e7d9d75ce37625ff (patch)
tree644fa430d774bc6797c774d1af2091138f696908 /2ner.cginc
parent6576484d1f9f1407fc40d36a1d46f5232869926c (diff)
ssao now applies to basecolor instead of lighting
also add toggle to consider l1 spherical harmonics. off by default for toon look.
Diffstat (limited to '2ner.cginc')
-rw-r--r--2ner.cginc11
1 files changed, 9 insertions, 2 deletions
diff --git a/2ner.cginc b/2ner.cginc
index b42dd06..e9edb8d 100644
--- a/2ner.cginc
+++ b/2ner.cginc
@@ -313,6 +313,12 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace
i.uv01.xy = eye_effect_00.uv;
#endif
+ float4x4 tangentToWorld = float4x4(
+ float4(i.tangent, 0),
+ float4(i.binormal, 0),
+ float4(i.normal, 0),
+ float4(0, 0, 0, 1)
+ );
#if defined(_CUSTOM30)
#if defined(FORWARD_BASE_PASS) || (!defined(_DEPTH_PREPASS) && defined(SHADOW_CASTER_PASS))
#if defined(_CUSTOM30_BASICCUBE)
@@ -337,7 +343,7 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace
#endif
#endif
- float4x4 tangentToWorld = float4x4(
+ tangentToWorld = float4x4(
float4(i.tangent, 0),
float4(i.binormal, 0),
float4(i.normal, 0),
@@ -350,7 +356,8 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace
ssao = get_ssao(i, tangentToWorld, debug);
#endif
YumPbr pbr = GetYumPbr(i, tangentToWorld);
- pbr.ao *= ssao;
+ //pbr.ao *= ssao;
+ pbr.albedo.rgb *= ssao;
#if defined(META_PASS)
#if defined(_EMISSION)