Ejemplo n.º 1
0
        public void SetOdsRendererType(OdsRendererType type)
        {
            //Currently StereoCubemap ODS rendering is only supported in the editor or when experimental is
            //enabled. If/When StereoCubemap ODS rendering is fully supported, removed this #if/#else/#endif.
#if (UNITY_EDITOR || EXPERIMENTAL_ENABLED)
            if (!isExperimental())
            {
                type = OdsRendererType.StereoCubemap;
            }
#else
            type = OdsRendererType.StereoCubemap;
#endif

            if (type != rendererType)
            {
                Debug.Assert(type < OdsRendererType.Count);
                if (odsRenderer != null)
                {
                    odsRenderer.Release();
                }

                if (type == OdsRendererType.Slice)
                {
                    Debug.Log("ODS Mode: Slice");
                    odsRenderer = new OdsSlice();
                }
                else
                {
                    Debug.Log("ODS Mode: Stereo Cubemap");
                    odsRenderer = new OdsStereoCubemap();
                }
                odsRenderer.SetVr180(vr180);
            }
            rendererType = type;
        }
Ejemplo n.º 2
0
        public void Awake()
        {
            CollapseIpd = true;
            odsRenderer = new OdsSlice();
            odsRenderer.SetVr180(vr180);
            rendererType     = OdsRendererType.Slice;
            lastRendererType = rendererType;

            Debug.Log("Init ODS Mode: " + rendererType.ToString());

            if (outputFolder == null)
            {
                outputFolder = System.Environment.GetFolderPath(
                    System.Environment.SpecialFolder.DesktopDirectory) + "/ODS";
            }
        }