-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webgl's filter function exhibits different behavior in handling transparency than in 1.7.0 #6514
Comments
For filters other than INVERT, the results when applied to transparent images seem to be different between 1.7.0 and 1.8.0. let img;
function preload(){
img = loadImage("https://inaridarkfox4231.github.io/assets/season/summer_small.png");
}
function setup(){
createCanvas(img.width, img.height);
background(img, 64);
filter(BLUR, 4);
} version 1.7.0 BLURversion 1.8.0 BLUR |
I've noticed some unusual and hazy behavior when attempting to render images using filters in a WebGL renderer. I'm not sure if this is a limitation of using fast GPU filters or if it's a bug. @davepagurek , if you could pinpoint where this buggy behavior is occurring, it would be very helpful. |
@perminder-17 my initial guess is that this is also caused by not clearing the canvas in enough places. Similar to how I was suggesting adding a p5.js/src/webgl/p5.RendererGL.js Lines 1096 to 1112 in 611941a
Hopefully that fixes it? Otherwise there might be some additional we have to do in the blur shader with how alpha is handled. |
This has now been resolved by #6503, so I'm going to close this branch for organizational purposes. Let me know if there are any other cases not covered that we still need to fix! |
Most appropriate sub-area of p5.js?
p5.js version
1.8.0
Web browser and version
Chrome
Operating System
Windows11
Steps to reproduce this
Steps:
Snippet:
version 1.7.0
version 1.8.0
I'm going to report this as a bug, but I don't know if it can be considered a bug just because the behavior is different.
The text was updated successfully, but these errors were encountered: