-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
shader overrides image if shader uses texture uniform input #6564
Comments
I am interested in solving this issue. |
Well I tried to understand what's going on , In your code, you are using two shaders (test1 and test2) with different fragment shaders (test1.frag and test2.frag). When you apply the shader using the shader() function, it affects all subsequent drawing operations, including rect() and image(). I think here you should use resetShader , so that both the shaders don't affect each other. |
Hi @Garima3110! Thanks for looking into it! In my view the problem is not in shaders affecting each other. I was not clear, sorry — she shaders should not be applied simultaneously, only one at a time. Just comment one and uncomment the other. |
This issue is similar to #6268 -- it has to do with the fact that the logic to determine when we consider a shader replaceable is not documented. I plan on making this system more explicit in the future, where you have to say which shaders you're overriding, but in the mean time, we can document what the current logic is. |
Can I contribute to this issue? I'm new here, but I have experience contributing to many other organizations. Is there a Discord channel or any other channel where I can discuss and get assistance? |
|
Most appropriate sub-area of p5.js?
p5.js version
1.8
Web browser and version
Chrome
Operating System
MacOS
Steps to reproduce this
Here is the example code https://editor.p5js.org/agrshch/sketches/1u8ZRnuKQ
image() function behave weirdly if there is a shader, which uses a texture input
The text was updated successfully, but these errors were encountered: