Original Post
Hi I'm working on a terrain engine but I have some problems with very basic maths. I divide the world into diffrent segments. Each segment is 256 quads wide. Each segment consists of 8 patches. A patch is 32 quads wide. I've created a vertex buffer with an array of vertices sized 257*257. But this just render an ugly graphic disaster. When I change the vertice buffer to 258*258 it works like a charm. But why? I can't see how how this happens since 256 quads shouldn't use more than 257 vertices per row/column. And I never use indexes outside that bound (afaik, tried to find any places where I do but couldn't find any). Am I being a total retard with the numbers or does my code contain some extremly hard to catch bug? I've looked through it hundreds of times now but still haven't found anything. And I can't live with a 258x258 buffer just because it works, if I don't understand why! :P