Dave Griffiths wrote:
Have you tried the noise command? It's in the spec, but I think it's hit and miss how much vendors support it. It's better to generate these procedurally to avoid the memory requirements, I'm sure there is some perlin glsl source around if your driver doesn't support it.
my questions are a combination of learning glsl and testing the features of gem. I am trying to get some shaders work in pd that I found included in xcode. these shaders that have a bunch of code in a seperate file (not vert and frag). I don't know how to implement this in glsl_program or any other gem render chain...
what is the noise command?
Sorry, I'm probably confusing things as I don't know enough about what you are doing (or pd for that matter).
GLSL has a noise command in it's spec, for doing 1,2 or 3D perlin noise lookups. On further reading though, this seems to be unsupported in the majority of cases.
The thing is that to avoid having to deal with huge 3D textures it's best to generate the noise procedurally (especially as it's procedurally generated to begin with anyway). There should be some glsl code floating around the net to do it (it's not actually that hard to do)
cheers,
dave