Closed
Description
here, the red face is behind the green face, but its edge appears in front (neither faces are transparent):
function setup() {
createCanvas(windowWidth, windowHeight-4, WEBGL);
stroke(255, 255, 255);
}
function draw() {
background(0);
fill(255, 0, 0);
rect(-100, -100, 200, 200, 1, 1);
translate(0, 0, 0.5);
fill(0, 255, 0);
rect(0, 0, 200, 200, 1, 1);
}