Transform 3d for hardware acceleration