Ejemplo n.º 1
0
        internal void DisposeTex(ref IRtvArrayTexture texture)
        {
            if (texture == null)
            {
                return;
            }

            MyRtvArrayTexture castedTexture = (MyRtvArrayTexture)texture;

            if (m_isDeviceInit)
            {
                castedTexture.OnDeviceEnd();
            }

            m_rtvArrays.Deallocate(castedTexture);
            texture = null;
        }
Ejemplo n.º 2
0
        internal static void InitScreenResources()
        {
            MyRwTextureManager rwManager = MyManagers.RwTextures;

            m_fullResViewDepthTarget = rwManager.CreateRtv("MyHBAO.FullResViewDepthTarget", MyRender11.m_resolution.X, MyRender11.m_resolution.Y,
                                                           SharpDX.DXGI.Format.R32_Float, 1, 0);
            m_fullResNormalTexture = rwManager.CreateRtv("MyHBAO.FullResNormalTexture", MyRender11.m_resolution.X, MyRender11.m_resolution.Y,
                                                         SharpDX.DXGI.Format.R8G8B8A8_UNorm, 1, 0);
            m_fullResAOZTexture = rwManager.CreateRtv("MyHBAO.FullResAOZTexture", MyRender11.m_resolution.X, MyRender11.m_resolution.Y,
                                                      SharpDX.DXGI.Format.R16G16_Float, 1, 0);
            m_fullResAOZTexture2 = rwManager.CreateRtv("MyHBAO.FullResAOZTexture2", MyRender11.m_resolution.X, MyRender11.m_resolution.Y,
                                                       SharpDX.DXGI.Format.R16G16_Float, 1, 0);

            MyArrayTextureManager arrayManager = MyManagers.ArrayTextures;

            m_quarterResViewDepthTextureArray = arrayManager.CreateRtvArray("MyHBAO.QuarterResViewDepthTextureArray",
                                                                            DivUp(MyRender11.m_resolution.X, 4), DivUp(MyRender11.m_resolution.Y, 4), NUM_SLICES, SharpDX.DXGI.Format.R16_Float);
            m_quarterResAOTextureArray = arrayManager.CreateRtvArray("MyHBAO.QuarterResAOTextureArray",
                                                                     DivUp(MyRender11.m_resolution.X, 4), DivUp(MyRender11.m_resolution.Y, 4), NUM_SLICES, SharpDX.DXGI.Format.R8_UNorm);
        }
Ejemplo n.º 3
0
        internal static void InitScreenResources()
        {
            MyRwTextureManager rwManager = MyManagers.RwTextures;
            m_fullResViewDepthTarget = rwManager.CreateRtv("MyHBAO.FullResViewDepthTarget", MyRender11.m_resolution.X, MyRender11.m_resolution.Y,
                SharpDX.DXGI.Format.R32_Float, 1, 0);
            m_fullResNormalTexture = rwManager.CreateRtv("MyHBAO.FullResNormalTexture", MyRender11.m_resolution.X, MyRender11.m_resolution.Y,
                SharpDX.DXGI.Format.R8G8B8A8_UNorm, 1, 0);
            m_fullResAOZTexture = rwManager.CreateRtv("MyHBAO.FullResAOZTexture", MyRender11.m_resolution.X, MyRender11.m_resolution.Y,
                SharpDX.DXGI.Format.R16G16_Float, 1, 0);
            m_fullResAOZTexture2 = rwManager.CreateRtv("MyHBAO.FullResAOZTexture2", MyRender11.m_resolution.X, MyRender11.m_resolution.Y,
                SharpDX.DXGI.Format.R16G16_Float, 1, 0);

            MyArrayTextureManager arrayManager = MyManagers.ArrayTextures;
            m_quarterResViewDepthTextureArray = arrayManager.CreateRtvArray("MyHBAO.QuarterResViewDepthTextureArray",
                DivUp(MyRender11.m_resolution.X, 4), DivUp(MyRender11.m_resolution.Y, 4), NUM_SLICES, SharpDX.DXGI.Format.R16_Float);
            m_quarterResAOTextureArray = arrayManager.CreateRtvArray("MyHBAO.QuarterResAOTextureArray",
                DivUp(MyRender11.m_resolution.X, 4), DivUp(MyRender11.m_resolution.Y, 4), NUM_SLICES, SharpDX.DXGI.Format.R8_UNorm);
        }
Ejemplo n.º 4
0
        internal void DisposeTex(ref IRtvArrayTexture texture)
        {
            if (texture == null)
                return;

            MyRtvArrayTexture castedTexture = (MyRtvArrayTexture)texture;

            if (m_isDeviceInit)
                castedTexture.OnDeviceEnd();

            m_rtvArrays.Deallocate(castedTexture);
            texture = null;
        }