Forums > Jitter

Tips for learning how to make my own shaders

Sep 09 2013 | 3:23 am

Hi Everyone,

I’ve been studying Max and jitter for almost half a year now and just about everything I do is with the OpenGl objects.

I use 3d models that are run through instances of and have finally decided its time to get my hands dirty with learning how to write my own shaders.
I tried the tut from Andrew (how to write your 1st shader) and couldn’t finish it, to me it wasn’t clear enough for a complete beginner. example below.

" The program tag allows you to specify a vertex and a fragment program for your shader. Using the "source" argument, you can specify another file for a specific program. In this case we are using "sh.passthrudim.vp.glsl" vertex program, which is one of several handy little utilities in the "jitter-shaders/shared" folder. This particular one just does some basic setup work for you and passes some useful variables to the fragment program."

So I have no idea what that means and why I would use it ! (I found the file "sh.passthrudim.vp.glsl", checked it out and came to the conclusion it was beyond me !)

So after browsing around the forums and the web I have the following questions.

1 – Where can i learn how to make a shader which explains "everything" i’m doing ?? Should I try and dive into this massive monolith called the orange book or the openGL super bible ?

2 – Any tips on how to learn how to make shaders specifically for ??
I’ve noticed theres a lot of differences between making a shader for a web browser and one for

3 – is an incredible site to me. Is it possible to translate these shaders into the world of jitter with ??

4 – What version of OpenGL do’s Jitter use, and how can i find it out ??

I have no problem studying to learn all these things I just need some pointers so I don’t learn "the wrong things".

So any links, book references and such would be greatly appreciated.

Massive thanks in advance


Sep 09 2013 | 3:56 am

[oops – ignore]

Sep 09 2013 | 11:40 am

jitter uses opengl version 2.1
you can find opengl info by opening the OpenGL Status window, found in the Options menu.

Sep 09 2013 | 11:49 am

Hi Rob,

The link leads back to the original article I tried to get through. So no luck there I’m afraid.
Nice with the options OpenGl view.
Still any tips on websites, or just a good book to get started with would be a massive help.

Sep 09 2013 | 12:59 pm

sorry, i missed that part.
no easy answer, the GLSL orange book is one good place to start.
the lighthouse tutorials are another.

but andrew’s article is the best for jitter-related glsl learning.
it takes some time to parse through, but he covers most everything needed to get started.

you might also want to skip gl.slab and glsl for now, and instead focus on gl.pix.
gl.pix uses gen to generate glsl files, thereby allowing you create custom shaders using max patching, and not requiring glsl knowledge. check out the gen patch-a-day series, the jitter/gen example patches found in the Max 6 examples folder, and search the forum for for more info.

Sep 09 2013 | 2:05 pm

Thanks a million Rob. I’ll take your advice and dive into
The link to the book is open GL 3.1, will this matter a lot with Jitter using version 2.1 ? If not then I’ll order it for future study.
And last but not least has cycling 74 made any tutorial videos for ?
Equations are something I’m a complete noob with, so if you have any last tips on where I could learn about them in a way which is applicable to then I’d be going in the right direction.

Sep 10 2013 | 6:02 am

+1 for more tutorials on There are tutorials. …and a lot of patches to reverse engineer (gen-a-day, jitter-examples…) but if possible, would be nice to see more tuts!

Sep 10 2013 | 10:08 am

i hear you about tutorials.
perhaps the materials wizards will cook up some more gl specific gen tutorials in the near future.

however one of the major strengths of using gen (ie gl.pix) is the ability to patch and see results on the fly. so i recommend just start patching, and watch the results, and post back to the forum with specific questions. i guarantee you will start learning immediately.

start with something simple, like Max 6.1/examples/jitter-examples/gen/

the basic premise is that every pixel passed to the input is processed by the gen patch, and output. with, the format is simplified because every pixel must always have four components (aka color planes R G B A).

once you’ve played around a bit, go check out the Gen Overview vignette found in the Max docs, and scroll down to the Jitter Gen Objects section.

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

Forums > Jitter