-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Martin Prout edited this page Jul 2, 2017
·
3 revisions
Notes about porting filters from Shadertoy
Shadertoy and Processing both have their own quirks when it comes to shader programming. We need to make some changes in order to make Shadertoy code work with Processing.
Replace: void mainImage( out vec4 fragColor, in vec2 fragCoord )
-> void main( void )
Replace all:
`iChannel0` -> `texture`
`fragCoord` -> `gl_FragCoord`
`fragColor` -> `gl_FragColor`
There is more to it than this but these tips should cover most basic filters.
Now go dig for some shaders and help us extend the library of filters available for Processing!