Forums > Jitter

[sharing] porting shaders to jit.gl.pix with codebox

December 2, 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 ( 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.

Attachments:
  1. JitGLPixForums.zip

December 2, 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.


December 3, 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 ro.me:

http://www.ro.me/tech/cel-shader

or even
http://www.ro.me/tech/video-shader — yikes!

anybody feel like having a go at this with me?


December 21, 2013 | 2:48 pm

Hello,

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?



LLT
December 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.

http://cycling74.com/forums/topic/sharing-raymarching-in-jit-gl-pix/

@BITTER

http://cycling74.com/forums/topic/sharing-small-generative-jit-gl-pix/

hoping that it might help you


December 23, 2013 | 1:09 pm

Thanks, already checking out!

Can i contact you for a small programming job?


December 23, 2013 | 8:14 pm

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



LLT
December 26, 2013 | 5:50 am

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

@ BITTER
  If I can do something for you ….
contact@laurentlatorpille.com



LLT
December 30, 2013 | 8:54 am

Hi
another example of Raymarching here:

http://cycling74.com/forums/topic/sharing-raymarching-in-jit-gl-pix/


January 3, 2014 | 6:36 am

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


January 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?


January 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.


January 29, 2014 | 10:35 am

I have been working using the bricks shader I lifted from this document

ftp://arts.ucsc.edu/pub/ems/maxtutors/Jit.tutorials/Shaders_in_Jitter.pdf

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

https://www.shadertoy.com/view/4dsGzH

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.


January 29, 2014 | 10:45 am

bricks.jxs zipped up

Attachments:
  1. bricks.zip

February 20, 2014 | 1:23 am

anyone know if it would be possible to port this one to Jitter?

http://webglplayground.net/?template=reactiondiffusion

I’ve been trying to start by porting the blur shaders to .jxs but not having much luck

Attachments:
  1. rdstart.zip

February 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/reaction.diffusion.color.world.maxpat


June 26, 2014 | 2:04 am

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.

Thanks,


June 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)