   Implementing Simplex Noise with Shaders
  I was wondering, how is this typically done? All of the implementations I can find have been in C or Java. Some parts of the algorithm, as-is, aren't supported by the shader profile that I'm using (I'm running on a GeForce 6800, using OpenGL 2.1). So, for instance, when it comes to using the bitwise & as a quick modulus, it tells me:error C5508: the operator "&" is not supported by this profileAnd I have a permutation table (array of ints), and another array of gradients, however I cannot index into them from the fragment shader. I am told:error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variableSo I suppose I could replace the bitwise & with a normal modulus (%). When I try, I don't get any compiler errors, but I can't run my shader yet to test it because compilation fails on those array look-ups. I guess I could replace those array lookups with texture lookups? I'm pretty sure this would work, but is it the best way or is it a naive method?Also, bonus question: I see a lot of people confused about how to create tiling simplex noise. Shouldn't this be trivial? The pattern repeats itself every 256 units anyway, so just render something that is 257x257?   
  Bitwise operators aren't yet supported.My recommendation is to compute the noise on the CPU and pass it as a texture.   ;  That's probably a good idea. =)   ;Quote:Original post by GeometrianBitwise operators aren't yet supported.They in GL 3.0 or the GL_EXT_gpu_shader4 extension. But just using a texture is fine.   ;  Draw a noise texture. Most painting packages have a noise function. If you don't just want random noise, you could produce the textures yourself with a Perlin noise implementation eventually. There is ready-to-use code for that on the net.Then in your shader read the texture. Probably you want the texture coordinates varying. You could use the model original texture coordinates and shift them with a timer-parameter and/or vertex/pixel position. If you don't need to randomize for each pixel, you can do the texture fetch also in the vertex shader already, if you have support for shader model 3.0.;  Just a quickie: SM3 is not a defacto way to assume VTF, so don't rely on that.I've realised this to my horror recently whilst implementing grass. A lot of DX10 (or better) cards will do VTF properly under DX9 drivers, but not all, or only handle R32F or R16F (and not even both). My Radeon 4800, which isn't brand new but is hardly a piece of crap either, will only do R32F for example. The DX9 cards we have at work won't do it at all, which kinda sucks, even though they support all other SM3 features.You really need to check the texture compat stuff as I'm sure the situation under OGL can't be much/any better.   