OpenB3D Bump Mapping Issue

BlitzMax Forums/MiniB3D Module/OpenB3D Bump Mapping Issue

RustyKristi(Posted 2016) [#1]
I know the example works but I'm just trying to create a simple test and using a terrain. I'm getting a dark terrain with a light on where my cam is near.

What I have done so far:

terrain:TTerrain=LoadTerrain("heightmap.jpg")
Local colortex:TTexture=LoadTexture("DIFFUSE.jpg")
Local normaltex:TTexture = LoadTexture("NORMAL.jpg")

Local shader:TShader=LoadShader("","bumpmap.vert.glsl","bumpmap.frag.glsl")
ShaderTexture(shader,colortex,"colorMap",0)
ShaderTexture(shader , normaltex , "normalMap" , 1)
SetFloat3(shader,"vTangent",0.1,0.1,0.1)
SetFloat(shader , "invRadius" , 0.01)

While Not KeyHit(KEY_ESCAPE)
   ShadeEntity(terrain,shader)
   RenderWorld
   Flip
Wend


No errors on output.


RustyKristi(Posted 2016) [#2]
Ok so I figured and testing with a mesh it loads ok, so it does not work with terrains?