I'm using filter() on my sketch but I want the user to be able to change the filter by clicking buttons.
So I have something that looks like:
PShader myFilter;
then in my draw,
filter(myFilter);
- how do I change the value of myFilter? I tried myFilter = THRESHOLD and myFilter = "THRESHOLD" but obviously that won't work as they need a PShader. I don't know what to do. Is there a string to PShader conversion method?
So I have something that looks like:
PShader myFilter;
then in my draw,
filter(myFilter);
- how do I change the value of myFilter? I tried myFilter = THRESHOLD and myFilter = "THRESHOLD" but obviously that won't work as they need a PShader. I don't know what to do. Is there a string to PShader conversion method?
1