Kuwahara
A painterly filter that smooths flat areas into brush-like strokes while keeping edges sharp. It is an anisotropic generalized Kuwahara filter: the sampling area follows the local edge direction.
Based on Maxime Heckel's article on painterly shaders.
import { Kuwahara } from '@react-three/postprocessing'
import { BlendFunction } from 'postprocessing'
return (
<Kuwahara
radius={4} // filter radius in pixels
sectorCount={8} // number of sectors, 2 to 8
blendFunction={BlendFunction.NORMAL} // blend mode
/>
)
The filter takes about radius * sectorCount * 3 texture samples per pixel, so large radii get expensive quickly. Lower sectorCount when raising radius.