H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
202 stars 80 forks source link

Shader sanitization #1530

Open colincornaby opened 7 months ago

colincornaby commented 7 months ago

Plasma's shaders were written in assembly - which also carried to the Metal implementation.

Goals in this branch:

For water shaders in particular, Chapter 1 of GPU Gems is a good reference: https://developer.nvidia.com/gpugems/gpugems/part-i-natural-effects/chapter-1-effective-water-simulation-physical-models

There is a C code version of a water shader available here: https://http.download.nvidia.com/developer/GPU_Gems/CD_Image/Index.html

Please note the shader supplied in GPU Gems does not appear to be the exact same shader that shipped with Uru.