summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-12-25 20:29:23 -0800
committeryum <yum.food.vr@gmail.com>2024-12-25 20:29:23 -0800
commit4f78fa07364d921d3dca811442cdf05e6a384370 (patch)
treeb2a3c2bb124d27f22e59226af09f2cf869a5086b
parentbc1a80b614afa8bf6f7d601f0caa3eba33320201 (diff)
Tweak LTCGI based on world experiments
-rw-r--r--pbr.cginc17
1 files changed, 16 insertions, 1 deletions
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;