Comments (4)
For filters other than INVERT, the results when applied to transparent images seem to be different between 1.7.0 and 1.8.0.
APPLY_FILTER_TO_ALPHA
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 BLUR
version 1.8.0 BLUR
from p5.js.
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.
from p5.js.
@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 clear()
in the non-blur branch of filter
, we might need to add a clear()
in the blur branch of the if statement here, probably before each pg.rect()
call:
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.
from p5.js.
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!
from p5.js.
Related Issues (20)
- Image uniforms get reset after each draw using a shader HOT 10
- [p5.js 2.0 RFC Proposal]: Shader Hooks HOT 2
- How to change color of all circles?? HOT 2
- `nf()` produces problematic string-formatting of negative numbers
- `p5.XML.listChildren()` inserts `#text` unexpectedly HOT 6
- `p5.Framebuffer.remove()` doesn't remove some resources HOT 2
- `p5.Graphics.remove()` doesn't remove some resources HOT 6
- missing link in documentation_style_guide.md HOT 2
- Fix broken link in documentation_style_guide.md
- Should setCamera() also call resetMatrix()? HOT 6
- Suggestion of a function to get screen coordinates HOT 4
- get() and/or pixelDensity() lag since v1.8.0 HOT 1
- background with alpha unexpected behavior HOT 1
- Current status of maintenance tasks, package audits, tracking tech debt, etc HOT 2
- On Latest Version of Safari SetUniform Doesn't Update in Draw Function HOT 3
- cam.ortho() on framebuffer cameras and no args uses the size from the main canvas
- Should `createCamera` still auto-set itself as the default camera? HOT 1
- inconsistent parameter handling HOT 2
- Possible bug with trigonometry functions HOT 2
- getting wrong language in the console. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p5.js.