<div dir="ltr"><div><div>Hi everybody,<br><br></div>Does someone know why we have the following code in direct3d.c (Direct3DCreateScene):<br>if (sys->d3dcaps.AlphaCmpCaps & D3DPCMPCAPS_GREATER) {<br>    IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_ALPHATESTENABLE,TRUE);<br>

    IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_ALPHAREF, 0x00);<br>    IDirect3DDevice9_SetRenderState(d3ddev, D3DRS_ALPHAFUNC,D3DCMP_GREATER);<br>}<br><br></div>Related documentation entries:<br><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb172254%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/bb172254%28v=vs.85%29.aspx</a><br>

<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb172599%28v=vs.85%29.aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/bb172599%28v=vs.85%29.aspx</a> (D3DRS_ALPHATESTENABLE)<br><div><div><div>

<div><br></div><div>With the statements above, all pixels with an alpha of 0 will be discarded. I've found some shaders where the output alpha is set to 0 and thus using this shader will cause the display to be all black<br>

<br></div><div>Any ideas?<br><br></div><div>Thanks<br></div><div><br></div><div>-- <br>Félix Abecassis<div><a href="http://felix.abecassis.me" target="_blank">http://felix.abecassis.me</a></div>
</div></div></div></div></div>