I'm reworking my terrain renderer, now it uses gpu tessellation with shaders, with a projected grid style approach: grid centered the and positioned around the camera by finding the nearest gridpoint behind it, at making it as the center.(skytiger's approach a bit reworked) It runs well until I turn off the "reposition method", and go to the edge of the grid.
Since the tessellation algorithm is under testing, I use a simple distance from camera type tessellation, the outer tess factors are depend on the distance of the edge center points from the camera, and the inner from the quad patch center point from the camera. When I move around I runs pretty well, but when I'm near the edge of the grid, in my case at (0,0,0) I get a terrible lagg.
I use VBOs, VAO, heightmap sampler in tessellation shader, no frustum culling(yet), no tessellation culling out of screen(yet), my map width is 2^n*GRIDSCALE, n and GRIDSCALE depends on the frustum. I tested it with map of 8192*8192. The average fps with camera unlocked(not centered) is about 60-70, but around P(0,0,0) its 8-15.
I rendered the whole test grid without cpu LOD, only with gpu tessellation.
What could possibly cause this?
EDIT: I encountered this kind of lag when I made my first ever heightmap, it was the simple static grid with triangle strips with VBO and index array. When I moved the camera to the center of the map, (it was not (0,0,0)) or the upper half in the 'z' axis in the 'z-' direction, and looked down the 'z+' axis I got the lag.
This is the laggy point of view. Around (0,0,0). Elsewhere it runs smooth.
EDIT: Point isn't at (0,0,0), I just didn't take into account the vertex shader transform, so the terrain quad center is (0,0,0) and the bottom right corner is (+MAPWIDTH,0,+MAPWIDTH)(the corner in the pic) At the other corners there is not any lagg.