GLSL 4 Tutorials for beginners?

Does anyone know - are there any good tutorials in the latest spec for beginners? I’m familiar with GLSL, but not advanced enough to get really crazy. I’m been working on writing a VSM shadow shader, and now that I have that implemented roughly, I’d like to write a decent Spotlight shader to work with it. However… everytime I search for any good examples to start it off, all I keep finding is stuff for GLSL 1.2. - a lot of things have changed since then :frowning:

I’d love any help you guys can give me.


ok well, how about tutorials targeting GLSL 3? (I believe 4 is just too new). Anyone?

There’s nothing wrong with GLSL 1.2. I’d start with that. Then if you really want to push it on to a higher profile, I think most of it is just getting rid of the built-in uniforms and attributes, and passing in your own user defined uniforms/attributes. And a few other small changes, like nuking the types from texturing functions (e.g. texture{1D,2D,3D,Cube} -> texture). That said, we haven’t actually kicked GLSL 1.2 to the cube and moved up yet, because time is money, and there’s not a huge reason to.

TyphoonLabs provides some pdf files for beginners to get started with GLSL. I’ve been reading them and they are quite helpful. However, the GLSL version they refer to is 1.10.59…
Would you consider this version too outdated?

Nothing particularly wrong with GLSL 1.10.
Get your shaders working first, then it’s easy to move version by adding #version xxx to the shader and changing varying to in or out for example. There’s virtually no change between 110 and 120, but there are a few reserved words which have been changed going on from 140+.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.