From 789ffb5a24550e24b540484a1d84b82cddc3a571 Mon Sep 17 00:00:00 2001 From: yum Date: Mon, 30 Mar 2026 16:01:43 -0700 Subject: Glitter: hacks for 1 neighbor sampling --- glitter.cginc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3