[sharing] porting shaders to jit.gl.pix with codebox
Just here to share some work Adam Rokhsar got into last month — porting GLSL from Mr. Doobs wonderful shader sandbox ( http://glsl.heroku.com/ ) into jit.gl.pix using CodeBox. It’s a great and relatively easy way to get complicated shaders running in Max, and I think there are some tools in here that will be really useful to the community (lots of ways to create nice looking sin waves that would be useful to artists doing A/V, for example).
All of this is pretty basic, and not all of it is running as it should, but hopefully this can be a starting point to getting more complicated shaders running in Gen, as I think there are a lot of very useful tools out there that could benefit the community.
Please let me know if you have any questions or if there are any scripts you would like help cracking into Gen.
thanks Rob! yes this looks great and you elegantly illustrate some things I discovered later.
for those interested in doing this, I guess the most basic things to clear up are as follows:
resolution = [dim]
gl_FragCoord = [cell]
gl_FragCoord.xy / resolution.xy = [norm]
While I used the Gen objects and plugged them into inlets which were declared as variables in CodeBox, Rob’s solution of just calling them up in CodeBox is much cleaner.
for people interested in more shaders google experiments produces a lot of very impressive shaders, albeit they are beyond my immediate capabilities. an example of one that I think would be very useful for many Jitter users would be from this cell shader from the project ro.me:
http://www.ro.me/tech/video-shader — yikes!
anybody feel like having a go at this with me?
Interested because i am testing and learning to understand shaders now for months.
This to start using shaders more intensive in Jitter and WebGL.
But after a few hours diving in GLSL code i start to feel me weird :), so i don’t know that i want to continue.
Anyway; can you explain me more about this and how to use Gen objects with CodeBox for this?
I don’t think so, but; is there some possibility to write and visualise shaders direct in Max/Jitter?
ALTERPROJECTS sorry I did not pay attention to your post.
I made my experience on my side and posted elsewhere …. :)
I come here now to share.
hoping that it might help you
Thanks, already checking out!
Can i contact you for a small programming job?
wow! great work. thanks for sharing… i will definitely dig into this :)
another example of Raymarching here:
Nice shader one!
Try to contact you but no answer.
I am trying to get to grips with the .jxs file format.
alterprojects, you state that
gl_FragCoord.xy / resolution.xy = [norm]
I know that gl_FragCoord.xy / resolution.xy is the first line of many fragment shaders I have seen, and that this produces normalizes coordinates. I am struggling to work out how to express this within a .jxs file.
Have toy had any success in this regard?
Hi R2, I’m not too familiar with .jxs but maybe your problem could be that you need to define your variables? posting an example would help solve your problem.
I have been working using the bricks shader I lifted from this document
I thought this was good as it doesn’t manipulate any textures passed through from the vertex program.
I thought it would be straightforward to replicate the background rectangles from this shader
But i can’t seem to make it work – it obviously doesn’t help that i have no idea what I am doing.
I thought it would be neat, and a great step forward in my glsl/jitter education to create a very simple shader with this rectangle background, and load it up into one of the devices from Fabrizio Poce’s v-module suite, and pass in color and rectangle size variable as uniforms, and tweak them with my midi-controller.
Any assistance you can provide would be greatly appreciated.
anyone know if it would be possible to port this one to Jitter?
I’ve been trying to start by porting the blur shaders to .jxs but not having much luck
Oli, the example you linked to is doing a bunch of other stuff, but Wes’s reaction diffusion example might be helpful to check out:
I’ve been trying to port examples from http://glsl.heroku.com into jit.gl.pix using CodeBox. With everything involving lighting, it ends up looking green/yellow instead of black and white e.g. with the fairly simple example attached. Can anyone see what’s going wrong?
I’m probably just missing something very obvious here.
Realised as soon as I’d posted.
Seems that putting one vec inside another just uses the first value in the vec.
Forums > Jitter