I'm trying to implement adaptive tessellation on pre-DX11 hardware. As a start I played a little with AdaptiveTessellationCS40 sample from DirectX SDK. Instead of .obj mesh I put a simple surface imitating terrain ( I'm a little lazy and just converted indexed vertices arrays to unindexed =) ). The only function changed is OnD3D11CreateDevice in AdaptiveTessellationCS40.cpp (its long so a pastebin link).
All works as intended except when camera looks at a surface with a specific angle (45 deg in XZ plane). For example:
D3DXVECTOR3 vecEye( 100, 200, -100 ); D3DXVECTOR3 vecAt ( 0.0f, 0.0f, 0.0f );
When (x = -z) some parts of surface disappears (even original untessellated vertices!). And when I rotate camera just a little they come back. When rotate back to x = -z disappears again. When looking from opposite corner (-x = z) or any other corner it works fine. Any partitioning schemes gives the same result. Some screenshots:
I've used C++, Visual studio 2012 Update 1, DirectX SDK (June 2010), GeForce GTX285, Windows 8. Also I make this sample to work without DirectX SDK and DXUT - the same sadly thing. The question is very specific and a Microsoft implementation is a ticky but maybe someone have ideas on why this happens?
P.S. Sorry for bad English.