Let me post the images first...
Solid shot where tearing occurs
And wireframe shot of that place
I am mostly using mostly using Riemers tutorial while the render code is..
Main render
public void Render()
{
device.Clear(Color.CornflowerBlue);
RasterizerState rs = new RasterizerState();
rs.CullMode = cullmode;
rs.FillMode = fillmode;
device.RasterizerState = rs;
effect.Parameters["xView"].SetValue(camera.ViewMatrix);
effect.Parameters["xProjection"].SetValue(camera.ProjectionMatrix);
effect.Parameters["xWorld"].SetValue(Matrix.Identity);
effect.Parameters["xEnableLighting"].SetValue(true);
effect.Parameters["xLightDirection"].SetValue(lightDirection);
effect.Parameters["xAmbient"].SetValue(0.5f);
globals.game.terrain.Render();
globals.game.spriteBatch.Begin();
globals.console.Render();
globals.game.spriteBatch.End();
}
Terrain.Render()
public void Render()
{
globals.game.graphics.effect.CurrentTechnique = globals.game.graphics.effect.Techniques["Colored"];
globals.game.graphics.effect.Parameters["xWorld"].SetValue(worldMatrix);
foreach (EffectPass pass in globals.game.graphics.effect.CurrentTechnique.Passes)
{
pass.Apply();
globals.game.graphics.device.Indices = indexBuffer;
globals.game.graphics.device.SetVertexBuffer(vertexBuffer);
globals.game.graphics.device.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, vertices.Length, 0, indices.Length / 3);
}
}
I was stuck with this problem for pretty long now (not knowing if it is caused by my coding skills, xna or some g-card configuration...) so i wonder if someone have some ideas what might cause it?