The_Dark_Side_of_Earth/world/earth.gdshader

22 lines
445 B
Text
Raw Permalink Normal View History

2025-09-19 12:08:28 +02:00
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.
//}