struct vsInputDepth { float4 pos : POSITION; }; struct vsOutputDepth { float4 pos : POSITION; }; vsOutputDepth vsDepth(vsInputDepth input) { vsOutputDepth output = (vsOutputDepth)0; output.pos = mul(input.pos, modelToProjMatrix); return output; } float4 psDepth(vsOutputDepth input) : COLOR { return 1; } technique Depth{ pass P0 { VertexShader = compile vs_2_0 vsDepth(); PixelShader = compile ps_2_0 psDepth(); } }