-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
- Internalization
- Friendly Errors
- Other (specify if possible)
p5.js version
1.7.0
Web browser and version
Chrome 108
Operating System
Amazon Linux
Steps to reproduce this
At work we do some cloud rendering of p5 via Chome/Puppeteer in AWS Batch. I noticed that WebGL lines were not showing up in our cloud exports (left) compared to in-browser on Chrome for Mac (right):
This is a screenshot of chrome://gpu from the cloud environment (click to expand):
We were able to fix our issue by changing the precision in the line vertex/fragment shader to be highp
instead of mediump
:
p5.js/src/webgl/shaders/line.vert
Lines 21 to 22 in 45ada83
precision mediump float; | |
precision mediump int; |
As I only have access to my Mac locally, what I don't know is if this is an issue with our setup on AWS or if this is a general issue on Linux. Is anyone else able to run this on Chrome for Linux and let me know if the line renders for you or not? If this is a general issue, then maybe we should update the line shader. But it might be a bug specifically in the drivers for this environment.
Snippet:
function setup() {
createCanvas(400, 400, WEBGL);
}
function draw() {
background(220);
noFill();
strokeWeight(5);
bezier(
-100, 100,
-50, -100,
50, -100,
100, 100
);
}
Live: https://editor.p5js.org/davepagurek/sketches/rhLpTaCeX