summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glitter.cginc2
1 files changed, 1 insertions, 1 deletions
diff --git a/glitter.cginc b/glitter.cginc
index e6c5cbf..908c1ab 100644
--- a/glitter.cginc
+++ b/glitter.cginc
@@ -214,7 +214,7 @@ float D_Kemppinen(float3 h, float alpha, float glint_alpha, float2 uv,
* normal(sigma_s, x_s - g_s) / N;
// 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 < 1 ? sqrt(w) * 2 : w;
//D_filter += w;
if (w > best_weight) {
best_weight = w;