1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-09-20 12:25:59 +08:00
Files
Godot-Shader-Lib/addons/ShaderLib/Procedural/Shapes/Ellipse.gdshaderinc
Digvijaysinh Gohil c105330a61 Ellipse node added
2023-10-13 20:41:28 +05:30

4 lines
189 B
Plaintext

float ellipse_shape(vec2 uv, float width, float height){
float _distance = length((uv * 2.0 - 1.0) / vec2(width, height));
return clamp((1.0 - _distance) / fwidth(_distance), 0.0, 1.0);
}