This is a gdshader implementation of the Kuwahara filter, tuned to produce an oil-painting aesthetic. It is available as both a canvas_item and spatial shader.
(https://commons.wikimedia.org/wiki/File:Tulip_festival_in_Ottawa_-_2019_(47925742658).jpg)
(https://commons.wikimedia.org/wiki/File:Mont-Saint-Michel_vu_du_ciel.jpg)
(https://commons.wikimedia.org/wiki/File:The_hydrothermal_system_of_Dallol.png)
(https://commons.wikimedia.org/wiki/File:001_Chateau_de_Chillon_and_Dents_du_Midi_Photo_by_Giles_Laurent.jpg)
(https://godotengine.org/asset-library/asset/678)
The shader comes with 4 pre-made circular kernels to choose from: 3, 4, 5 and 6 pixels wide. The examples above were captured using the default 4 pixel kernel. To use a different kernel size, rename at lines 15, 17 and 55. The larger the kernel, the slower the shader.
Follow the Full Screen Quad instructions found in this tutorial. The shader has undergone significant optimisation and should be able to achieve 1920x1080 60fps on any modern computer at the supplied kernel sizes.
- Circular kernels to reduce block artifacts
- Approximate standard deviation to improve performance