WIP: One more step towards D3D optimization