Skip to content

Instantly share code, notes, and snippets.

@valler
valler / quad_ccw.glsl
Last active December 9, 2019 19:29
WebGL2 Minimal Shaders
// both triangles CCW
vec3 quad (int x)
{
vec3 p = step(vec3(1,2,3),vec3(x%3));
return mix(p, vec3(p.x-p.y,p.x,0), step(3.,float(x%6)));
}