processing / processing/p5.js

[p5.js 2.0 Bug Report]: WebGPU: antialias controls don't quite work like in WebGL

Open
#8,482 4 comments 0 reactions 1 assignee View on GitHub

@Piyushrathoree is already working on this.

Since Feb 5, 2026.

p5.js 2.0+
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)
p5.js version

Latest dev-2.0 build

Web browser and version

Chrome

Operating system

All

Steps to reproduce this

In WebGPU, we now only draw to a main framebuffer when it's necessary -- e.g. for a filter shader or when reading back/saving pixels. Currently, the main framebuffer is antialiased but the main canvas is not, so that we aren't unnecessarily double-antialiasing when we draw it to the main canvas at the end of a frame. However, if we are drawing directly to the main canvas before that, those drawn shapes will not be antialiased. Also, I don't believe setAttributes works yet in WebGPU, which in WebGL is how you can decide whether the main canvas should be antialiased or not.

So the task here would be:

  • Support setAttributes({ antialias: true }) (or false)
  • If antialiasing is enabled, antialias the main canvas only when drawing directly to it, and not when drawing the main framebuffer back to it

Note that this is a quite complex system to jump into, so while this is open for contribution, this is not a great first issue if you're just getting started.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.