You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You get an error about only being able to do this in WebGL mode.
This is because initially, we were thinking of letting createFilterShader be a way to make custom shaders that can be used in general, not just in filter. However, since #6482, we auto-bind these to the filter graphic anyway.
I propose that we:
take out this error so that even 2D users can use custom filter shaders that people make
add a separate method (createCustomFragmentShader?) to create a normal shader using a default vertex shader
The text was updated successfully, but these errors were encountered:
Hey @davepagurek. This may be a silly question but is there a reason we can't have the createShader() and loadShader() functions also accept a frag shader as a single argument and automatically call something like your proposed createCustomFragmentShader function internally?
That's not a silly question, I think making create/loadShader also accept just a fragment shader would also work for (2)!
Initially I was thinking that one reason why we might want to have a separate name mentioning a fragment shader is so that we could potentially do the reverse as well, and have another method where you only specify a custom vertex shader (e.g. for this https://openprocessing.org/sketch/1934027) but that's a less common use case, and may be covered better by a more versatile API like #6144.
Most appropriate sub-area of p5.js?
p5.js version
1.8.0
Web browser and version
Firefox 117
Operating System
macOS 14
Steps to reproduce this
Steps:
createFilterShader
You get an error about only being able to do this in WebGL mode.
This is because initially, we were thinking of letting
createFilterShader
be a way to make custom shaders that can be used in general, not just infilter
. However, since #6482, we auto-bind these to the filter graphic anyway.I propose that we:
createCustomFragmentShader
?) to create a normal shader using a default vertex shaderThe text was updated successfully, but these errors were encountered: