internal void Release() { MyDepthStencilManager dsManager = MyManagers.DepthStencils; MyRwTextureManager rwManager = MyManagers.RwTextures; dsManager.DisposeTex(ref m_depthStencil); dsManager.DisposeTex(ref m_resolvedDepthStencil); rwManager.DisposeTex(ref m_gbuffer0); rwManager.DisposeTex(ref m_gbuffer1); rwManager.DisposeTex(ref m_gbuffer2); rwManager.DisposeTex(ref m_lbuffer); }
internal static void Resize(int width, int height, int samplesNum, int samplesQuality) { MyDepthStencilManager dsManager = MyManagers.DepthStencils; dsManager.DisposeTex(ref m_resolvedDepth); m_resolvedDepth = dsManager.CreateDepthStencil("MyScreenDependants.ResolvedDepth", width, height); MyRwTextureManager texManager = MyManagers.RwTextures; texManager.DisposeTex(ref m_ambientOcclusionHelper); m_ambientOcclusionHelper = texManager.CreateRtv("MyScreenDependants.AmbientOcclusionHelper", width, height, Format.R8_UNorm, 1, 0); texManager.DisposeTex(ref m_ambientOcclusion); m_ambientOcclusion = texManager.CreateRtv("MyScreenDependants.AmbientOcclusion", width, height, Format.R8_UNorm, 1, 0); TilesX = (width + MyLightRendering.TILE_SIZE - 1) / MyLightRendering.TILE_SIZE; TilesY = ((height + MyLightRendering.TILE_SIZE - 1) / MyLightRendering.TILE_SIZE); TilesNum = TilesX * TilesY; if (m_tileIndices != null) { m_tileIndices.Release(); } m_tileIndices = new MyRWStructuredBuffer(TilesNum + TilesNum * MyRender11Constants.MAX_POINT_LIGHTS, sizeof(uint), MyRWStructuredBuffer.UavType.Default, true, "MyScreenDependants::tileIndices"); }