Skip to content

Instantly share code, notes, and snippets.

View riccardoscalco's full-sized avatar
🐢
Thinking slowly

Riccardo Scalco riccardoscalco

🐢
Thinking slowly
View GitHub Profile
const vertex = `
attribute vec2 a_position;
attribute vec3 a_barycentric;
uniform mat3 u_matrix;
varying vec3 vbc;
void main() {
vbc = a_barycentric;
gl_Position = vec4((u_matrix * vec3(a_position, 1)).xy, 0, 1);
}`