21 lines
445 B
Text
21 lines
445 B
Text
shader_type canvas_item;
|
|
|
|
varying vec2 world_position;
|
|
uniform vec4 color : source_color;
|
|
|
|
void vertex() {
|
|
world_position = (MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy;
|
|
}
|
|
|
|
void fragment() {
|
|
if(length(world_position) <= 3000.) {
|
|
COLOR = color;
|
|
} else {
|
|
discard;
|
|
}
|
|
}
|
|
|
|
//void light() {
|
|
// // Called for every pixel for every light affecting the CanvasItem.
|
|
// // Uncomment to replace the default light processing function with this one.
|
|
//}
|