With the answer on my question I was able to draw using LOD my own terrain(it's awesome, guys
). But I got another problem, and to avoid creating a new topic(since the question still relates somehow to the game area(terrain) drawing) I'll describe the problem and will ask the question here. I got stuck with lightning. I'm using XNA and I just tried to make some nice(I believe it's possible) lightning with BasicEffect class. I used directionalLight0 for this purpose and... it doesn't work. I've tried to rotate the terrain, then camera, but there is no any visible objects on the screen at all, there is only dark screen. Here is my code for the lightning and for the world matrix:
[source lang="csharp"] this.basicEffect.LightingEnabled = true; this.basicEffect.DirectionalLight0.Direction = new Vector3(0,0,1); this.basicEffect.DirectionalLight0.DiffuseColor = new Vector3(1f, 1f, 1f);[/source]
Only transformation done on the world matrix:
[source lang="csharp"]this.world = Matrix.CreateTranslation(new Vector3(-this.terrainTexture.Width / 2.0f, 0, this.terrainTexture.Height / 2.0f));[/source]
Where could be the problem?
Edited by DmitryNik, 06 November 2012 - 05:03 AM.