Skip to content

Commit d357542

Browse files
committed
Use 4 AA samples instead of max
1 parent 1f17097 commit d357542

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

p5.Framebuffer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ class Framebuffer {
374374
// TODO: use this in WebGL 1
375375
gl.renderbufferStorage(
376376
gl.RENDERBUFFER,
377-
gl.getParameter(gl.MAX_SAMPLES),
377+
Math.min(4, gl.getParameter(gl.MAX_SAMPLES)),
378378
this.glInternalRenderbufferFormat(hasAlpha),
379379
this.width * this.density,
380380
this.height * this.density,
@@ -386,7 +386,7 @@ class Framebuffer {
386386
if (this._renderer.hasWebGL2) {
387387
gl.renderbufferStorageMultisample(
388388
gl.RENDERBUFFER,
389-
gl.getParameter(gl.MAX_SAMPLES),
389+
Math.min(4, gl.getParameter(gl.MAX_SAMPLES)),
390390
this.glDepthInternalRenderbufferFormat(),
391391
this.width * this.density,
392392
this.height * this.density,

0 commit comments

Comments
 (0)