-
Has anyone worked with shaders in py5? is there any special rules for shaders which will be used in apply_filter()? I've tried some examples with calling py5.shader() and using set method of Shader class - and it was a success, but apply_filter() works in a very strange way (black window most of the time). |
Beta Was this translation helpful? Give feedback.
Answered by
hx2A
Jun 9, 2023
Replies: 1 comment 3 replies
-
Yes, I have used shaders extensively, and have spent much of today with that. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I looked at some code I wrote that uses
apply_filter()
and I recall the shader needs to work a bit differently than regular shaders. Normally when you create a vert and frag shader it is for drawing triangles and the shader has no information about pixels it is being drawn on top of.apply_filter()
is different in that you have access to the all of the pixels in the window.The following fragment shader could be used with
apply_filter()
.