some zbuf improvements