ashima / webgl-noise

Procedural Noise Shader Routines compatible with WebGL
MIT License
2.8k stars 302 forks source link

Texture-intensive noise implementations #18

Closed couleurs closed 4 years ago

couleurs commented 8 years ago

Hi!

First off thanks a lot for this work it's been incredibly useful :)

This is not really an "issue" but I have a question for you guys about something posted in the "Wiki" and couldn't find another way to ask it. In the Wiki, you say: "However, if you are generating noise by itself and using a lot of it, the texture-intensive noise implementations this work was based on...". I'm interested in exploring those texture-based implementations to see the performance trade-offs. Is there any resource or article you recommend to get started with them?

Thanks a lot! Johan

stegu commented 8 years ago

The implementations are linked from the wiki on the Github repo, in the section "Other noise implementations". Here's a direct link:

http://www.itn.liu.se/~stegu/simplexnoise/GLSL-noise.zip

My first implementation of that was posted to the GLSL forum on OpenGL.org about a decade ago. It was based partly on an implementation of "Improved Noise" from Simon Green at Nividia, published in volume 2 of "GPU Gems":

http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter26.html

couleurs commented 8 years ago

Great, thanks! I think I got confused because that .zip file doesn't actually include the texture files. Would any noise texture be good enough or there are specific ones you're using in your implementations? Thanks!

stegu commented 8 years ago

The texture is generated in the code, using very little code and a couple of small arrays. It is a very particular pixel pattern with four color channels, and that particular texture is absolutely necessary for the algorithm to give the correct result. Storing the texture in a file seemed silly, seing how easy it was to generate it, but now with WebGL I see how it could be useful. I should perhaps try to revisit that old code and update it to maka a WebGL demo with a PNG texture file.

stegu commented 4 years ago

On second thought, I will not. Too many versions to maintain already, and too little time to do it. Closing the issue.