-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Graphics object used as mask results in image that is half the size of the original graphics object #6793
Comments
Thanks for filing this issue! I think this bug may be the same as #6770 -- @Papershine, maybe you can test this example on your PR to see if it fixes it too? |
Thank you! Yes, I had actually tested adding Is there a solution that solves the misalignment without losing the quality of the sketch? |
If it helps to debug, I just switched to version 1.4.1 per #6770, and that worked. However, not ideal for a long-term solution since I'd like to use the most recent version. Let's see if @Papershine's pull request solves it? |
whee yes! <3 |
Hey awesome P5 team, do you have any tips for what I should do in the meantime regarding this bug while the pull request is being approved? Clients eager to see things right. |
Hi! One option to use a shader to do the masking. Not sure if you can use webGL or not, but if you can it's a pretty short shader. Here's a quick example: https://editor.p5js.org/aferriss/sketches/qYWb4P49d |
Another option, if your mask is shapes that you draw, is to use |
Awesome, thanks so much Dave. Will look into both of these. |
Most appropriate sub-area of p5.js?
p5.js version
1.9.0
Web browser and version
Chrome 121.0.6167.139
Operating system
MacOSX
Steps to reproduce this
Steps:
My gut is that it might have something to do with the device pixel ratio or the pixel density, but I have no reason to believe that and haven't been able to prove that.
Snippet:
The text was updated successfully, but these errors were encountered: