Skip to content

Instantly share code, notes, and snippets.

@Zi7ar21
Last active May 3, 2022 00:17
Show Gist options
  • Save Zi7ar21/1f32d39cf1feba110e05aeb0ad2d9fef to your computer and use it in GitHub Desktop.
Save Zi7ar21/1f32d39cf1feba110e05aeb0ad2d9fef to your computer and use it in GitHub Desktop.
GLSL Bezier Curve Points
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