Depth map (or height map?) mesh generation using SceneKit. This is my first time using SceneKit and it’s way less hassle than writing every single OpenGL operations line by line.
Basically what it does is to generate terrain / height map using given depth map. The calculation of the normal is still messed up though.
You can get the source code here:
- Testing handwriting custom fragment shader (well, just trying out how to set SceneKit to use my own fragment shader)
- Metal compute shader, kernel function is taken from InvasiveCode which is pretty straightforward. The only thing that I wanted to know is the initialisation steps.