14 lines
359 B
Plaintext
14 lines
359 B
Plaintext
shader_type canvas_item;
|
|
|
|
#include "res://shaders/tools.gdshaderinc"
|
|
|
|
/* Рисует текстуру по маске в форме окружности */
|
|
|
|
instance uniform float radius: hint_range(0.0, 1.0) = 0.39; /* Радиус */
|
|
const vec2 center = vec2(0.5, 0.5);
|
|
|
|
void fragment()
|
|
{
|
|
COLOR.a *= smooth_px(length(UV - center), radius, DS);
|
|
}
|