diff options
| author | yum <yum.food.vr@gmail.com> | 2026-03-30 16:01:43 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-03-30 16:18:01 -0700 |
| commit | d4b85ad2704fe9144c36856f00d4c1aeeddf93f4 (patch) | |
| tree | 09597da0e83436df25157472d021786e46799db3 | |
| parent | 2b8e22958a701c313c45319f34fb162907da7857 (diff) | |
Glitter: hacks for 1 neighbor sampling
| -rw-r--r-- | glitter.cginc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/glitter.cginc b/glitter.cginc index ebacffe..e6c5cbf 100644 --- a/glitter.cginc +++ b/glitter.cginc @@ -212,12 +212,16 @@ float D_Kemppinen(float3 h, float alpha, float glint_alpha, float2 uv, float w = roulette * normal(sigma_a, x_a - g_a) * normal(sigma_s, x_s - g_s) / N; - D_filter += w; + // This is hacky nonsense intended to improve the 1-sampling case. Original + // code is commented out below. + D_filter += sqrt(w) * 2; + //D_filter += w; if (w > best_weight) { best_weight = w; best_g_a = g_a; } D_filter += w_lambda * compensation(x_a, sigma_a, res_a); + // This is also hacked in. D_filter += w_lambda * compensation(x_s, sigma_s, res_s); } |
