Hi,
i first draw some nearer points, then draw some farther background lines. But when i draw them, the points are hidden by the lines (yes i can tell since the background lines are massive). What's wrong? below is the shader:
pass points
{
SetVertexShader(CompileShader(vs_4_0, vsPoints()));
SetGeometryShader(NULL);
SetPixelShader(CompileShader(ps_4_0, psPoints()));
SetBlendState(NoBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF);
SetDepthStencilState(EnableD, 0);
}
pass grids
{
SetVertexShader( CompileShader( vs_4_0, vsGrids() ) );
SetGeometryShader( NULL );
SetPixelShader( CompileShader( ps_4_0, psGrids() ) );
SetBlendState(NoBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF);
SetDepthStencilState(EnableD, 0);
}
where
BlendState NoBlending
{
BlendEnable[0] = FALSE;
RenderTargetWriteMask[0] = 0x0F;
};
DepthStencilState EnableD
{
DepthEnable = TRUE;
DepthWriteMask = ALL;
DepthFunc = LESS;
}
Thanks a lot!
[Edited by - yk_cadcg on June 8, 2008 4:38:08 AM]