kuwahara:MultipassFilter< { radius:{ default:4; description:"Size of the brush patches in pixels."; label:"Radius (px)"; max:10; min:1; type:"int"; unit:"px"; }; sharpness:{ default:8; description:"How strongly each pixel follows the smoothest nearby patch; higher keeps edges crisper."; label:"Sharpness"; max:16; min:1; step:0.5; type:"float"; }; }, > = ...
Smoothed Kuwahara: the four (r + 1)² quadrants around a pixel each give a mean colour and the
standard deviation σ of their sRGB-encoded luminance; the means are blended with weights
((σ_min + ε) / (σ + ε))^sharpness, so the flattest side dominates. Flat areas get smoothed, edges
stay sharp, textures turn into painterly strokes. Blending (instead of picking the minimum)
avoids hard decisions. Means are of premultiplied values, alpha included.
Smoothed Kuwahara: the four (r + 1)² quadrants around a pixel each give a mean colour and the standard deviation σ of their sRGB-encoded luminance; the means are blended with weights ((σ_min + ε) / (σ + ε))^sharpness, so the flattest side dominates. Flat areas get smoothed, edges stay sharp, textures turn into painterly strokes. Blending (instead of picking the minimum) avoids hard decisions. Means are of premultiplied values, alpha included.