summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glitter.cginc6
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);
}