PDA

View Full Version : noise1 - no matching overloaded function found error message



pion
12-16-2010, 07:13 PM
I am reading the The OpenGLŪ Shading Language (Language Version: 1.2) http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf mentions, "8.9 Noise Functions - Noise functions are available to both fragment and vertex shaders. ".

I have the following code snippet on my fragment shader:

float x = 0.5;
float noise = noise1(x);


It gives me the following error:


ERROR: 0:26: 'noise1' : no matching overloaded function found

What did I do wrong?

Thanks in advance for your help.

pion
12-17-2010, 07:03 AM
It seems that WebGL uses GLSL version 1.0

The OpenGL 2.0 GLSL version 1.0 http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf does not seem to provide noise1 function.

3droberto
02-15-2011, 08:58 PM
For a random float can pass a uniform with a random value given by Javascript:
var rand = Math.random () * 100000;

For a random vector can send a uniform sampler2D of a noisy texture