Shape edges are jagged in p5js WEBGL mode compared to the default 2D mode.
smooth() and setAttributes(‘antialias’,true) did not work or improve this.
Does anyone know how to achieve clean anti-aliased edges for p5js WEBGL shapes?
Here is an example output:
Here is the code:
function setup (){
createCanvas(100,100,WEBGL) //left image
//createCanvas(100,100) //right image
noStroke();
}
function draw(){
// translate(50,50) //right image only
background(255)
fill(0)
rotate(PI/3)
rectMode(CENTER)
rect(0,0,67,67)
}