使用基于物理的水着色器进行正弦和 FFT 流体模拟
by Garrett Gunnell
This repo contains the code associated with my videos on the same subject.
These shaders aren't optimized (there is a lot of trash left around for demo purposes) or intended to be used as a production ready asset. Please use as a reference for your own shaders.
Will do someday!
This method is really cheap and is ideal for small bodies of water like ponds or maybe lakes, it is not ideal for large bodies of water like oceans because it tiles very quickly.
This method is the big daddy of the simple sum of sines and uses oceanographic spectrums to generate a frequency domain ocean height map which we then convert to the time domain with the inverse fast fourier transform, effectively summing millions of waves instead of just a few like the simple sum of sines. This is obviously overkill for small bodies of water, but necessary for large bodies to have a realistic water surface with basically no tiling.
https://iquilezles.org/articles/fbm/
https://www.shadertoy.com/view/MdXyzX
http://filmicworlds.com/blog/everything-has-fresnel/
https://boksajak.github.io/files/CrashCourseBRDF.pdf
https://people.computing.clemson.edu/~jtessen/reports/papers_files/coursenotes2004.pdf
https://www.keithlantz.net/2011/11/ocean-simulation-part-two-using-the-fast-fourier-transform/
https://gpuopen.com/gdc-presentations/2019/gdc-2019-agtd6-interactive-water-simulation-in-atlas.pdf
https://wikiwaves.org/Ocean-Wave_Spectra
暂无开放 Issues,或尚未同步最近议题。