How do I make bump mapping work with fastextension library?
I have this code, wich is my attempt to make it work:
Include "include\FastExt.bb"
Graphics3D 640,480,GraphicsDepth(),2
InitExt
camera = CreateCamera() : PositionEntity camera,0,0,-100
light = CreateLight() : RotateEntity light,0,45,0 : LightColor light,150,150,150 : AmbientLight 50,50,50
mesh = LoadMesh( "..\media\thing.b3d")
bumptexture = LoadTexture("..\media\normal.bmp")
EntityTexture mesh,bumptexture,0
TextureBlend bumptexture,FE_bump
Bump(True)
While Not KeyHit(1)
TurnEntity mesh,0,-0.5,0
UpdateWorld()
SetBuffer BackBuffer()
RenderWorld()
Flip()
Wend
WaitKey()
End
|