GLSL Clouds Shader - Without texture3D

HI , i’m working with GLSL shader and i’m trying to develop a clouds shader without texture3D. I mean, I want use Perline Noise inside the fragment shader. Does it make sense to you? Do you think it will be faster than using software computed 3d texture ?
Thank Bye

noise() in GLSL isn’t implemented on most cards (only crazy high end 3dlabs cards IIRC), so it’ll always return 0. Theres various replacement functions floating around the net you might want to try as a replacement, or maybe just go with a 2d texture if you can live with 2d noise. If your cloud shader is heavy on calculations then a texture based noise would probably be quicker as you can hide the lookup latency between the arithmetic instructions.

may you show me better why do you think going with a 2d tex will be faster?
thank you very much. bye

How could i hide the lookup latency between the arithmetic instruction?
bye

instead of doing this:

fetch texel A
fetch texel B
fetch texel C
calculate with values of texel A
calculate with values of texel B
calculate with values of texel C

you could do this:

fetch texel A
calculate with values of texel A
fetch texel B
calculate with values of texel B
fetch texel C
calculate with values of texel C

so that while calculating, the next texel can be requested from memory

To answer your 2nd question, 3D textures require a lot more lookups to sample it.

With 2D, you typically have a minimum of 4 texel-reads (if 1 texel is larger than 1 pixel)
With 3D, you typically have a minimum of 8 texel-reads

What Riven said. ;D Also, 2d textures are likely to cache better.

So in the end , in your opinion which is the better way (faster ) to develope a cloud shader : prepassing a texture or implementing a noise() function inside the shader???

thank you