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

25 lines
No EOL
681 B
Text

#include "../sdf/circleSDF.msl"
#include "fill.msl"
#include "stroke.msl"
/*
contributors: Patricio Gonzalez Vivo
description: Draw a circle filled or not.
use: circle(<float2> 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(float2 st, float size) {
return fill(circleSDF(st), size);
}
float circle(float2 st, float size, float strokeWidth) {
return stroke(circleSDF(st), size, strokeWidth);
}
#endif