Add additional WebGL filter stress scenarios to visual regression suite
Increasing access
Adds more WebGL filter scenarios to the visual regression suite so rendering issues can be caught earlier. This makes it easier to verify changes and reduces the chance of unnoticed breakage across releases.
Most appropriate sub-area of p5.js?
- [ ] Accessibility
- [ ] Color
- [x] Core/Environment/Rendering
- [ ] Data
- [ ] DOM
- [ ] Events
- [ ] Image
- [ ] IO
- [ ] Math
- [ ] Typography
- [ ] Utilities
- [x] WebGL
- [ ] Build process
- [x] Unit testing
- [ ] Internationalization
- [ ] Friendly errors
- [ ] Other (specify if possible)
Feature enhancement details
While working on #8549 , I manually tested a few additional WebGL filter interaction scenarios that are not currently covered by the visual regression suite.
The current suite covers individual filters and some chained combinations, but does not cover:
- Filters applied after
texture()on WebGL geometry - Filters on
createGraphics(WEBGL)buffers - Filters after
resizeCanvas() - Filters with
pixelDensity(2) - Additional chained combinations beyond existing coverage
These scenarios behaved consistently across versions during manual testing. It may be useful to formalize them into automated visual tests to improve regression detection in future releases.
This issue is for visibility of stress scenarios discovered while working on #8549 .
I’m interested in tackling this and adding these cases to the visual regression suite.
My plan is to build out the test sketches for the texture(), createGraphics, and resizeCanvas scenarios you mentioned. I'll then integrate them into the test/visual framework and generate the baseline 'gold' images for verification.
I'm currently looking through the existing WebGL test cases to make sure my scripts align with the current project standards. Please let me know if you have any specific requirements for the test structure before I start...
Thanks for the interest! @saurabh24thakur
The core regression test from #8549 has already been added and merged. This issue was created to track additional stress scenarios discovered during that work.
I’m currently working on expanding those cases here, so I’ll continue developing them under this issue. If there’s anything specific you’d like to see covered, feel free to suggest it.
Thanks for the update, @aashu2006 . This totally makes sense if you're already on a roll with those scenarios.
While you're building those out, I was thinking it might be useful to also cover filter behavior when using custom shaders via shader(), specifically to ensure the filter pipeline correctly restores the state after the custom shader runs.
I'll keep an eye on your progress—let me know if you hit a bottleneck or want a second pair of eyes on any of the PRs..