Shadertoy to jit.pix
Hi Guys,
Could somebody help me out?
I've checked the forum, but still don't know how to do it properly...porting simple shadertoy codes into jit.pix codebox.
Like this one :
https://www.shadertoy.com/view/XsXXDn
It seems pretty simple :S
There's lots of discussion about this in the forum history; a search of "shadertoy" returns many results:
Basically, Shadertoy provides a bunch of useful parameters and functions, that you would have to emulate in a jit.gl.pix port, including some glsl functions (e.g. mat4 functions). Also, the way textures are handled might be a little different -- what Shadertoy does for you in the web page, you will need to do in your max patch. But most of these problems have been solved in the forum posts linked above.
some additional info:
fragColor = out 1
fragCoord = cell
fragCoord / iResolution = norm
iResolution = dim
codebox doesn't allow you to assign vector components (e.g. p.x = some expr), so you have to use vec or concat for that.
jit.time (from the jit.mo package) is very useful for iGlobalTime.
this gets close to the original: