Files
uarep-ctl/shaders/tools.gdshaderinc

7 lines
281 B
Plaintext

const float DS = 0.004; /* Относительное расстояние на котором выполняется сглаживание краёв */
float smooth_px(float r, float R, float ds)
{
return 1.0 - smoothstep(R - ds, R + ds, r);
}