Skip to content

WEBGL anti-aliasing different rendering results regarding anti-aliasing/alpha blending in latest p5.js version #6182

@mheesakkers

Description

@mheesakkers

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
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

1.6.0

Web browser and version

Chrome (Official Build) (x86_64)

Operating System

Mac 13.3.1 (a)

Steps to reproduce this

I created a topic about this on Processing's discourse about my problem because I thought I was doing something wrong.

In short. I created a shader program in the p5.js editor that does color mixing (also transparancy) using spectral.js. When I tried implementing that shader in my local project I got some weird anti-aliasing artefacts. After a lot of digging I saw that the online editor uses the p5.js 1.4.1 version and I was running the latest version 1.6.0 locally. Changing the library version to an older one resolved my issue.

Result comparison (zoomed-in)
Bugfixing
On the left using p5.js 1.41, on the right p5.js version 1.6.0

See link to the program in the p5.js editor:
Link to shader program in p5.js editor

Steps:

  1. Go to index.html and change the p5.js version inside the head tag of index.html to 1.6.0
  2. Run the sketch and see the anti-aliasing artefacts
  3. Change the version back to 1.4.1
  4. Run the sketch and see a nice and clean looking result

I'm not that technical so I could not provide where the culprit in the p5.js library would be or if this would be the expected behaviour. Hope this can be fixed in the latest version of p5.js.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions