Open Metamere opened 3 months ago
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
This is already available here or are you thinking of something else?
@limzykenneth I think they're referring to an equivalent of createFilterShader
, which does the vertex shader for you and makes sure it's bound to the right WebGL context automatically. We don't have a load*
equivalent for that just yet, so it would make sense to me to add it for consistency
@limzykenneth, @davepagurek, you're both correct. I was trying to help by creating this to address an issue someone else brought up, but I misunderstood and messed it up initially. Hopefully the current version is correct.
Increasing access
It would provide a utility and convenience function. It would allow for a smaller main script, which could make things easier to manage, especially when working in the on-line editor with large shader files.
Most appropriate sub-area of p5.js?
Feature request details
p5.js now has a createFilterShader() function where one can create a filter from just a fragment shader, which needs to be defined in the main script file. It would make sense to provide a loadFilterShader() function to allow for creating a filter shader by loading from a separate file, just like loadShader() provides that utility to accompany the createShader function. It would keep things consistent.