Search code examples
xcodescenekitmetal-performance-shaders

how water shaders are implemented in Fox application


Apple have simple Fox project which demo basic SceneKit functionality. Can anyone explain where/how waterfall texture animation shader is implemented (also Fox2 with lava)? I know shaders can be loaded from file and bounded programmatically, but in this case shader is integrated within scene and no luck so far in getting around how.


Solution

  • In SceneKit water like in Badger example we explain how the water effect in the Badger sample code is embedded directly in the scene file. The waterfall from Fox and lava from Fox 2 also use shader modifiers in the same way.