modified by SuperD for to support glasses-free 3D