Implement a Z prepass on rendering to prevent overdraw.