I used this code to create a render with multi samples, intending to render with AA. When I set the samples parameter to 1, it’s OK. But I encountered such warning and error
playcanvas-stable.dbg.js:5026 WebGL: INVALID_ENUM: renderbufferStorageMultisample: invalid internalformat
updateBegin @ playcanvas-stable.dbg.js:5026
launch.js:7518 ERROR: FRAMEBUFFER_INCOMPLETE_DIMENSIONS
console.error @ launch.js:7518
6[.Offscreen-For-WebGL-0x7fe05a056000]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glClear: framebuffer incomplete
249[.Offscreen-For-WebGL-0x7fe05a056000]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer
when the samples was set to greater then 1. What went wrong? Here follows my code
var colorBuffer = new pc.Texture(this.app.graphicsDevice, {
width: this.app.graphicsDevice.width,
height: this.app.graphicsDevice.height,
format: pc.PIXELFORMAT_R8_G8_B8_A8,
});
this.renderTarget = new pc.RenderTarget({
colorBuffer: colorBuffer,
samples: 2,
autoResolve: true,
});