I'm writing small application that recieves pretransformed vertices and display them on screen.
FVF for vertice is defined as (and I can't change it)
#define MY_FVF D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1
Z buffer is created via fields of D3DPRESENT_PARAMETERS (this is changeable)
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D24S8;
The problem is I get very short far clipping plane (every 开发者_开发技巧mesh is cliped at 1.0f from camera). I cannot use matrix projection (as I said, I got already pretransformed vertices). Is there any way to set depth buffer limit? Or is there any other way to have z-buffer with long far clipping plane on pretransformed vertices?
Solved, the problem was lurking completely elsewhere: the mesh I was recieving from external source was cut at 1.0f
精彩评论