From 4f78fa07364d921d3dca811442cdf05e6a384370 Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 25 Dec 2024 20:29:23 -0800 Subject: Tweak LTCGI based on world experiments --- pbr.cginc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pbr.cginc b/pbr.cginc index d65f981..0095654 100644 --- a/pbr.cginc +++ b/pbr.cginc @@ -245,7 +245,7 @@ float4 getLitColor( direct_light.color *= (1 - e); } -#if defined(_LTCGI) +#if 0 && defined(_LTCGI) ltcgi_acc acc = (ltcgi_acc) 0; if (_LTCGI_Enabled_Dynamic) { LTCGI_Contribution( @@ -379,6 +379,21 @@ float4 getLitColor( indirect_light).xyz; #endif + +#if 1 && defined(_LTCGI) + ltcgi_acc acc = (ltcgi_acc) 0; + if (_LTCGI_Enabled_Dynamic) { + LTCGI_Contribution( + acc, + i.worldPos, + normal, + view_dir, + 1.0 - smoothness, + 0); + pbr.rgb += acc.diffuse * pbr.rgb + acc.specular; + } +#endif + // TODO formalize with parameters // Break up color banding by adding some dithering to shaded color. float screen_dither = ign(tdata.screen_uv_round) * .00390625; -- cgit v1.2.3