Last active
May 3, 2022 00:17
-
-
Save Zi7ar21/1f32d39cf1feba110e05aeb0ad2d9fef to your computer and use it in GitHub Desktop.
GLSL Bezier Curve Points
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec2 bezier(float t, vec2 p0, vec2 p1, vec2 p2, vec2 p3) | |
{ | |
vec2 a = mix(p0, p1, t); | |
vec2 b = mix(p1, p2, t); | |
vec2 c = mix(p2, p3, t); | |
return mix(mix(a, b, t), mix(b, c, t), t); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment