|
- shader_type canvas_item;
-
- uniform vec4 base_color : hint_color = vec4(128,128,128,255);
- uniform vec4 mid_dark_color : hint_color = vec4(96, 96, 96, 255);
- uniform vec4 dark_color: hint_color = vec4(48, 48, 48, 255);
- uniform vec4 mid_lite_color : hint_color = vec4(160, 160, 160, 255);
- uniform vec4 lite_color : hint_color = vec4(192, 192, 192, 255);
-
- void fragment() {
- float base = 128.0/255.0;
- float md = 96.0/255.0;
- float dark = 48.0/255.0;
- float ml = 160.0/255.0;
- float lite = 192.0/255.0;
-
- vec4 color = texture(TEXTURE, UV);
- if (color == vec4(base,base,base,1.0)){
- color = base_color;
- } else if (color == vec4(md,md,md,1.0)){
- color = mid_dark_color;
- } else if (color == vec4(dark,dark,dark,1.0)){
- color = dark_color;
- } else if (color == vec4(ml,ml,ml,1.0)){
- color = mid_lite_color;
- } else if (color == vec4(lite,lite,lite,1.0)){
- color = lite_color;
- }
- COLOR = color;
- }
|