17 lines
467 B
Plaintext
17 lines
467 B
Plaintext
shader_type canvas_item;
|
|
uniform vec4 ground_tint : source_color = vec4(0.4,0.35,0.25,1.0);
|
|
varying vec4 vertex_tint;
|
|
|
|
void vertex() {
|
|
vertex_tint = COLOR;
|
|
}
|
|
|
|
void fragment() {
|
|
vec4 art = texture(TEXTURE,UV);
|
|
float light = dot(art.rgb,vec3(0.299,0.587,0.114));
|
|
vec3 color = mix(vec3(light),art.rgb,0.78)*0.9;
|
|
float footing = smoothstep(0.55,0.9,UV.y);
|
|
color = mix(color,ground_tint.rgb*(0.45+light),0.12+footing*0.16);
|
|
COLOR = vec4(color,art.a)*vertex_tint;
|
|
}
|