LightMesh.bb 353 B

12345678910111213141516
  1. Graphics3D 640,480 ,16,2
  2. camera=CreateCamera()
  3. ent=CreateSphere()
  4. EntityFX ent,2 ; enable vertex colors
  5. Lightmesh ent,-255,-255,-255 ; reset vertex colors from 255,255,255 (default) to 0,0,0
  6. LightMesh ent,255,255,0,50,-20,20,-20 ; apply fake lighting
  7. MoveEntity camera,0,2,-10
  8. PointEntity camera,ent
  9. While Not KeyDown(1)
  10. RenderWorld
  11. Flip
  12. Wend
  13. End