PNG with ALPHA on DX11 not really working

It seems to me that the Alpha channel works badly in DX11.


In this example path you can see that the Alpha perforation depends on the display order.

Look how the result changes by changing the order of connection of the QUADs
The same thing happens with Sprite and Box too
alpha problem.zip (22.9 KB)

This is normal, depth buffer and alpha don’t work together.

You can use AlphaToCoverage to improve the situation bit, but it will never work perfectly unless you sort the elements by distance to the camera or disable the depth buffer.

1 Like

Aha I understand. But to work as you say I should find the distance from the center of the quads to the PLANE of the camera, not to the position of the camera.
Do you know how to do it?

alpha problem2.zip (24.1 KB)

You have to draw from back to front, anyways for your case alphaToCoverage is way to go, you really need to use draw order only in case where you have semi-transparent objects (like fog)

You can place alpha to coverage using Blend (Advanced)

Perfect it works

thanks!