4 corner gradient
Pick 4 different colours for each of the UV’s 4 corners.
Shader code
shader_type canvas_item;
uniform vec4 topleft:hint_color;
uniform vec4 topright:hint_color;
uniform vec4 bottomleft:hint_color;
uniform vec4 bottomright:hint_color;
void fragment() {
vec2 uv_corner = vec3(UV, 0.0).xy;
vec4 top = mix(topleft, topright, uv_corner.x);
vec4 bottom = mix(bottomleft, bottomright, uv_corner.x);
COLOR = mix(top, bottom, uv_corner.y);
}
Why are you doing that in line 9? Isn’t it the same just using UV built-in?