From c2f86fa940195d07e2c82614985b249418f0d4f6 Mon Sep 17 00:00:00 2001 From: yum Date: Mon, 30 Jun 2025 10:14:43 -0700 Subject: more brdf tweaks - mainly fix how reflectance is handled --- 2ner.cginc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '2ner.cginc') diff --git a/2ner.cginc b/2ner.cginc index e1bf6f7..d1af3da 100644 --- a/2ner.cginc +++ b/2ner.cginc @@ -430,8 +430,11 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace float4 lit = YumBRDF(i, l, pbr); #endif - lit.rgb += LightVolumeSpecular(pbr.albedo, pbr.smoothness, pbr.metallic, - pbr.normal, l.view_dir, l.L00, l.L01r, l.L01g, l.L01b); + [branch] + if (_UdonLightVolumeEnabled) { + lit.rgb += LightVolumeSpecular(pbr.albedo, pbr.smoothness, pbr.metallic, + pbr.normal, l.view_dir, l.L00, l.L01r, l.L01g, l.L01b); + } #if defined(_HARNACK_TRACING) pbr.albedo = harnack_output.color; -- cgit v1.2.3