Reputation: 73
I add samples: 4
and change gl.RGBA
to gl.RGBA4
to enable antialias of first framebuffer attachment:
const framebufferInfo = twgl.createFramebufferInfo(gl, [
{ format: gl.RGBA4, type: gl.UNSIGNED_BYTE, min: gl.LINEAR, wrap: gl.CLAMP_TO_EDGE, samples: 4 },
{ format: gl.DEPTH_STENCIL, samples: 4 },
], canvas.width, canvas.height)
I got error of renderbufferStorageMultisample: internalformat invalid for samples > 0
.
Upvotes: 3
Views: 122