Z-Buffer blanking algorithm C# implementation