   cloud shader - uniform sampler3D noise
  i have a simple cloud shader but i have problems to implement it. i have to create a 3D noise texture and bind it to the shader. i am looking for a simple way creating the 3D noise storing it to a texture and bind this to my uniform sampler3D noise in my shader. the language i am using is c++.i have the orange shader book but this couldnt really help me.thx david   
Generating Perlin NoiseYou can load your noise image to a texture using glTexSubImage2D(...).   ;  thx Kambizi still have some problems with my shaders. if i create a noise texture and bind it to a plane, my sky always looks the same. the animation of the clouds isnt working and i dont know what i am doing wrong.my shaders:cloud.fragvarying float LightIntensity; varying vec3  MCposition;uniform sampler3D Noise;uniform vec3 SkyColor;// (0.0, 0.0, 0.8)uniform vec3 CloudColor;   // (0.8, 0.8, 0.8)uniform vec3 Offset;  // updated each frame by the applicationvoid main (void){    vec4  noisevec  = texture3D(Noise, MCposition + Offset);    float intensity = (noisevec[0] + noisevec[1] +    noisevec[2] + noisevec[3]) * 1.5;    vec3 color   = mix(SkyColor, CloudColor, intensity) * LightIntensity;    gl_FragColor = vec4 (color, 1.0);}cloud.vert:varying float LightIntensity;varying vec3  MCposition;uniform vec3  LightPos;uniform float Scale;void main(void){    vec3 ECposition = vec3 (gl_ModelViewMatrix * gl_Vertex);    MCposition = vec3 (gl_Vertex) * Scale;    vec3 tnorm = normalize(vec3 (gl_NormalMatrix * gl_Normal));    LightIntensity  = dot(normalize(LightPos - ECposition), tnorm);    LightIntensity *= 1.5;    gl_Position= ftransform();}Generating the noise and bind it to a texture:  this->make3DNoiseTexture();  glGenTextures(1, &noise3DTexName);  glBindTexture(GL_TEXTURE_3D, noise3DTexName);  glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT);  glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT);  glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT);  glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);  glTexParameterf(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);  glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA,noise3DTexSize, noise3DTexSize, noise3DTexSize,0, GL_RGBA, GL_UNSIGNED_BYTE, noise3DTexPtr);Loading and setting the variables for the shader:  shader = new Shader(ResourceManager::getInstance()->getDataDir() + "/shaders/cloud.vert",  ResourceManager::getInstance()->getDataDir() + "/shaders/cloud.frag");  this->shader->activateShader();  Shader::Uniform(shader, "Noise").set(0);  Shader::Uniform(shader, "SkyColor").set(0.0f, 0.0f, 0.8f);  Shader::Uniform(shader, "CloudColor").set(0.8f, 0.8f, 0.8f);  Shader::Uniform(shader, "LightPos").set(5.0f, 0.0f, 5.0f);  Shader::Uniform(shader, "Scale").set(0.1f);  Shader::Uniform(shader, "Offset").set(0.0f, 0.0f, 0.0f);  this->shader->deactivateShader();Drawing stuff:  glPushAttrib(GL_ENABLE_BIT);  glDisable(GL_LIGHTING);  glDisable(GL_BLEND);  glEnable(GL_TEXTURE_3D);  glBindTexture(GL_TEXTURE_3D, noise3DTexName);  glPushMatrix();  this->shader->activateShader();  glColor3f(1.0, 1.0, 1.0);  glBegin(GL_QUADS);  glTexCoord2f(1.0f, 1.0f); glVertex3f(0.0f, 0.0f,  0.0f);  glTexCoord2f(0.0f, 1.0f); glVertex3f( 0.0f, 10.0f,  0.0f);  glTexCoord2f(0.0f, 0.0f); glVertex3f( 10.0f, 10.0f,  0.0f);  glTexCoord2f(1.0f, 0.0f); glVertex3f(10.0f, 0.0f,  0.0f);  glEnd();  this->shader->deactivateShader();  glPopMatrix();  glPopAttrib();A screenshot:screenshotThe only problems is that the clouds are not animated. I am also not sure if this problem has to do with the offset and what value the offset has to have.thx for the help   ;  I haven't looked through all your code, but you need to update the 3D textures Z texcoord or depth coordinate with a timer or someway and then update only the Z coordinate in the shader not x,y. Offset.z += (Time * .1);    vec4  noisevec  = texture3D(Noise, MCposition + Offset);;  thx for the help! know it works:)   