fuckingtech/public/assets/glsl/lygia/draw/circle.glsl
Elias Rhouzlane bf76c6b086 fix: code
2025-04-06 17:23:52 +02:00

25 lines
No EOL
686 B
GLSL

#include "../sdf/circleSDF.glsl"
#include "fill.glsl"
#include "stroke.glsl"
/*
contributors: Patricio Gonzalez Vivo
description: Draw a circle filled or not.
use: <float> circle(<vec2> st, <float> size [, <float> width])
license:
- Copyright (c) 2021 Patricio Gonzalez Vivo under Prosperity License - https://prosperitylicense.com/versions/3.0.0
- Copyright (c) 2021 Patricio Gonzalez Vivo under Patron License - https://lygia.xyz/license
*/
#ifndef FNC_CIRCLE
#define FNC_CIRCLE
float circle(vec2 st, float size) {
return fill(circleSDF(st), size);
}
float circle(vec2 st, float size, float strokeWidth) {
return stroke(circleSDF(st), size, strokeWidth);
}
#endif