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; }
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); }
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); }
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; }