Files
tekton/assets/shaders/rounded_border.gdshader
T

14 lines
556 B
Plaintext

shader_type canvas_item;
#include "res://assets/shaders/rounded_border.gdshaderinc"
uniform vec2 rect_size = vec2(270.0, 108.0);
uniform vec4 corner_radius = vec4(20.0, 20.0, 20.0, 20.0); // top-right, bottom-right, top-left, bottom-left
uniform float border_width : hint_range(0.0, 50.0) = 3.0;
uniform vec4 border_color : source_color = vec4(0.06666667, 0.13333334, 0.1882353, 1.0);
void fragment() {
vec4 tex_color = texture(TEXTURE, UV) * COLOR;
COLOR = apply_rounded_border(tex_color, UV, rect_size, corner_radius, border_width, border_color);
}