I have two sprites A and B. A - opaque, Z = 1. B - half-transparent, Z = 0. Draw call order A -> B.
According to MSDN I should use flag D3DXSPRITE_SORT_DEPTH_BACKTOFRONT
when drawing transparent sprites of varying depths. Problem is it works vice versa - only with flag D3DXSPRITE_SORT_DEPTH_FRONTTOBACK
.
Please explain how depth sorting works in ID3DXSprite
and where is Z value growing (I assume from 0 to 1, 1 being most remote from screen).