Forums > Jitter

[sharing] porting shaders to with codebox

Dec 02 2013 | 12:01 pm

Hi y’all,

Just here to share some work Adam Rokhsar got into last month — porting GLSL from Mr. Doobs wonderful shader sandbox ( ) into 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.

Dec 02 2013 | 4:43 pm

thanks for sharing!

i went ahead and ported the remaining ones you were having troubles with.
take a look, as there are some some simplifications i made that might help you out in the future.

Dec 03 2013 | 10:25 am

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

or even — yikes!

anybody feel like having a go at this with me?

Dec 21 2013 | 2:48 pm


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?

Dec 21 2013 | 5:10 pm

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

Dec 23 2013 | 1:09 pm

Thanks, already checking out!

Can i contact you for a small programming job?

Dec 23 2013 | 8:14 pm

wow! great work. thanks for sharing… i will definitely dig into this :)

Dec 26 2013 | 5:50 am

It’s great if there is movement on this side :D

  If I can do something for you ….

Dec 30 2013 | 8:54 am
Jan 03 2014 | 6:36 am

Nice shader one!
Try to contact you but no answer.
Still interested?

Jan 24 2014 | 1:57 pm

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?

Jan 28 2014 | 7:09 am

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.

Jan 29 2014 | 10:35 am

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.

Jan 29 2014 | 10:45 am

bricks.jxs zipped up

Feb 20 2014 | 1:23 am

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

Feb 20 2014 | 10:26 am

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:

Max 6.1/examples/jitter-examples/gen/

Jun 26 2014 | 2:04 am

I’ve been trying to port examples from into 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.


Jun 26 2014 | 2:23 am

Realised as soon as I’d posted.
Seems that putting one vec inside another just uses the first value in the vec.

Viewing 18 posts - 1 through 18 (of 18 total)

Forums > Jitter