I'm currently trying to get the Z-Prepass to work on alpha tested geometry. I've looked at the sample "TiledLighting" from the AMD SDK and saw that they seperate alpha tested from the regular opaque geometry during the prepass (They do opaque first, then all alpha tested). Is there any reason why ? I'm also wondering why in their alpha tested prepass shader they output the (float4) DiffuseMap color using SV_TARGET.
The prepass shader looks like the following:
float4 RenderSceneAlphaTestOnlyPS( VS_OUTPUT_POSITION_AND_TEX Input ) : SV_TARGET
{
float4 DiffuseTex = g_TxDiffuse.Sample( g_Sampler, Input.TextureUV );
float fAlpha = DiffuseTex.a;
if( fAlpha < g_fAlphaTest ) discard;
return DiffuseTex;
}