Add Kuwahara Filter, implements #49
This commit is contained in:
parent
d512005b86
commit
632b4593aa
5 changed files with 167 additions and 0 deletions
16
examples/kuwahara.gdshader
Normal file
16
examples/kuwahara.gdshader
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
//!load ./images/mountain.jpg
|
||||
|
||||
#include "res://shaderlib/kuwahara.gdshaderinc"
|
||||
#include "res://shaderlib/hsv.gdshaderinc"
|
||||
|
||||
void fragment() {
|
||||
// Kuwahara
|
||||
COLOR.rgb = kuwahara(TEXTURE, UV, 20, 80.0, 18.0, 0.6, .15, 8);
|
||||
// A litte bit of color adjustments
|
||||
vec4 hsv = rgb2hsv(COLOR);
|
||||
hsv.x += .03;
|
||||
hsv.y *= 1.4;
|
||||
COLOR = hsv2rgb(hsv);
|
||||
}
|
||||
Reference in a new issue