I'm rendering simple 2D figures in DirectX 11.1 and I cannot get Z-values to be rendered; all pixels with Z != 0 get discarded. I'm doing proper world transform as far as I know. X/Y translations work. Rotation over Z works.
Do I need to setup a depth/stencil buffer to avoid DirectX to discard all primitives with Z coordinates?
Thanks, I'll supply any additional information ,code or screens if required.
I've fixed D3D11_VIEWPORT minDepth and MaxDepth members to 0.0/1.0 (I was clearing both to zero). Now pixels with 1.0 < z < 0.0 are discarded.
My platform is Windows Runtime App (Win8.1 / WinPhone 8.1).
Rotated triangle over the Y-axis (pixels with Z>1 discarded)
Triangle Vertex at (x=-0.5,y=-0.5) with z=2. Clipped and hidden.