(Demo) Heightmap Normal Computing

Yesterday I stumbled upon this small math note that explains how to compute the normal from a procedural heightmap:

Here is a small demo that puts in practice the calcNormal() function to compute the normal vector in the vertex shader.

You can download the GeeXLab demo from THIS LINK (the demo is also available in the full code sample pack in the gl-32/heightmap-normal/ folder). As usual, GeeXLab can be downloaded from the THIS PAGE.