Noise functions don't seem to work in shaders

I’m writing my own shader, and having some trouble with the noise function. No matter what I pass in to noise1(), it always evalutates to zero. I’ve tried passing in floats and vec2 with sampline sizes bolth below and above 1, but everything still evaluates to zero.

Is this a problem with my card not implementing noise, or is this due to a programming error? In general, should noise*() be implemented in OpenGLSL?

Mark McKay

I’m not sure what drivers implement noise*() but it is not very suprising that it doesn’t work. Even in the Orange Book they don’t use the GLSL noise functions because of their lack of implementation. Your best bet would be to just generate a noise texture, pass that in, and sample from it.

I think only 3DLabs hardware currently supports the GLSL noise functions. There’s a solution that works everywhere though:

Simplex Noise