Alpha test in dx11?

how can a png with alpha show in a standard depth buffer dx11 renderer ?
tried ConstantAlphaTest but didn’t work as expected

Simplest way, in pixel shader specify before output:
if (col.a < threshold) discard();

(Not sure if it’s with or without())
That would break Antialiasing… tho

Forgot to mention there is also AlphaToCoverage on Blend Advanced

And more cool MSAA

@ggml: Enable Blend State >> AlphaToCoverage (DX11.RenderState). This also preserves MSAA. But it works only if you have no depth tests like depth prepass applied…

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.