I'm working on a 3d terrain. I tried out some existing GLSL implementations for bump mapping using normal maps from a Procedural Infinite 3D Cave Generation tutorial.
The actual code that I used is in the Cave3D repository, not the one in the post. Here's their vertex shader and their fragment shader. The textures can be found on the same repository.
Note that this shader uses tri-planar texturing.
The problem is that I'm getting the following artifacts - black spots:

Does anyone have a clue why this is happening?
