internal static void RemoveScreenResources() { if (m_resolvedLight != null) { m_resolvedLight.Release(); m_reduce0.Release(); m_reduce1.Release(); m_uav3.Release(); m_cloudLayerFogTargetUAV.Release(); m_localLum.Release(); m_div2.Release(); m_div4.Release(); m_div8.Release(); m_div8_1.Release(); m_rgba8_linear.Release(); m_rgba8_0.Release(); m_rgba8_1.Release(); m_rgba8_2.Release(); if (m_rgba8_ms != null) { m_rgba8_ms.Release(); m_rgba8_ms = null; } m_prevLum.Release(); MyRwTextures.Destroy(ref m_shadowsHelper); MyRwTextures.Destroy(ref m_shadowsHelper1); MyRwTextures.Destroy(ref m_gbuffer1Copy); } }
public void Dispose() { if (m_texture != RwTexId.NULL) { MyRwTextures.Destroy(m_texture); m_texture = RwTexId.NULL; } m_wrapper.Close(); }
public override void Dispose() { if (m_texture != RwTexId.NULL) { MyRwTextures.Destroy(m_texture); m_texture = RwTexId.NULL; } base.Dispose(); }
internal static void RemoveAtmosphere(uint ID) { Atmospheres.Remove(ID); if (AtmosphereLUT.ContainsKey(ID)) { MyRwTextures.Destroy(AtmosphereLUT[ID].TransmittanceLut); } AtmosphereLUT.Remove(ID); }
internal static void ResizeCascades() { if (m_cascadeShadowmapArray != RwTexId.NULL) { MyRwTextures.Destroy(m_cascadeShadowmapArray); } m_cascadeResolution = MyRender11.m_renderSettings.ShadowQuality.Resolution(); m_cascadeShadowmapArray = MyRwTextures.CreateShadowmapArray(m_cascadeResolution, m_cascadeResolution, m_cascadesNum, Format.R24G8_Typeless, Format.D24_UNorm_S8_UInt, Format.R24_UNorm_X8_Typeless, "cascades shadowmaps"); }
internal static void ResizeCascades() { if (m_cascadeShadowmapArray != RwTexId.NULL) { MyRwTextures.Destroy(m_cascadeShadowmapArray); MyRwTextures.Destroy(m_cascadeShadowmapBackup); } var cascadeResolution = MyRender11.m_renderSettings.ShadowQuality.ShadowCascadeResolution(); m_cascadeShadowmapArray = MyRwTextures.CreateShadowmapArray(cascadeResolution, cascadeResolution, m_initializedShadowCascadesCount, Format.R24G8_Typeless, Format.D24_UNorm_S8_UInt, Format.R24_UNorm_X8_Typeless, "Cascades shadowmaps"); m_cascadeShadowmapBackup = MyRwTextures.CreateShadowmapArray(cascadeResolution, cascadeResolution, m_initializedShadowCascadesCount, Format.R24G8_Typeless, Format.D24_UNorm_S8_UInt, Format.R24_UNorm_X8_Typeless, "Cascades shadowmaps backup"); }
internal static void RemoveScreenResources() { if (m_reduce0 != null) { m_reduce0.Release(); m_reduce1.Release(); m_uav3.Release(); HalfScreenUavHDR.Release(); QuarterScreenUavHDR.Release(); EighthScreenUavHDR.Release(); EighthScreenUavHDRHelper.Release(); m_rgba8_linear.Release(); m_rgba8_0.Release(); m_rgba8_1.Release(); m_rgba8_2.Release(); if (m_rgba8_ms != null) { m_rgba8_ms.Release(); m_rgba8_ms = null; } m_prevLum.Release(); m_transparencyAccum.Release(); m_transparencyCoverage.Release(); MyRwTextures.Destroy(ref PostProcessedShadows); MyRwTextures.Destroy(ref CascadesHelper); MyRwTextures.Destroy(ref m_gbuffer1Copy); } if (m_backbufferCopyResource != null) { m_backbufferCopyResource.Release(); m_backbufferCopyResource = null; } if (m_lastScreenDataResource != null && m_lastScreenDataResource != Backbuffer) { m_lastScreenDataResource.Release(); m_lastScreenDataResource = null; } if (m_lastDataStream != null) { m_lastDataStream.Dispose(); m_lastDataStream = null; } }
private void DestroyCascadeTextures() { MyRender11.Log.WriteLine("DestroyCascadeTextures"); MyRender11.Log.IncreaseIndent(); if (m_cascadeShadowmapArray != RwTexId.NULL) { MyRender11.Log.WriteLine("m_cascadeShadowmapArray destroy"); try { MyRwTextures.Destroy(m_cascadeShadowmapArray); } finally { m_cascadeShadowmapArray = RwTexId.NULL; } } if (m_cascadeShadowmapBackup != RwTexId.NULL) { MyRender11.Log.WriteLine("m_cascadeShadowmapBackup destroy"); try { MyRwTextures.Destroy(m_cascadeShadowmapBackup); } finally { m_cascadeShadowmapBackup = RwTexId.NULL; } } m_cascadesReferenceCount = Math.Max(m_cascadesReferenceCount - 1, 0); if (m_cascadesReferenceCount == 0 && m_combinedShadowmapArray != RwTexId.NULL) { MyRender11.Log.WriteLine("m_combinedShadowmapArray destroy"); try { MyRwTextures.Destroy(m_combinedShadowmapArray); } finally { m_combinedShadowmapArray = RwTexId.NULL; } } MyRender11.Log.DecreaseIndent(); }
internal static void RemoveScreenResources() { if (m_resolvedLight != null) { m_resolvedLight.Release(); m_reduce0.Release(); m_reduce1.Release(); m_uav3.Release(); m_localLum.Release(); m_div2.Release(); m_div4.Release(); m_div8.Release(); m_div8_1.Release(); m_rgba8_linear.Release(); m_rgba8_0.Release(); m_rgba8_1.Release(); m_prevLum.Release(); MyRwTextures.Destroy(ref m_shadowsHelper); MyRwTextures.Destroy(ref m_shadowsHelper1); } }
private void DestroyCascadeTextures() { if (m_cascadeShadowmapArray != RwTexId.NULL) { MyRwTextures.Destroy(m_cascadeShadowmapArray); m_cascadeShadowmapArray = RwTexId.NULL; } if (m_cascadeShadowmapBackup != RwTexId.NULL) { MyRwTextures.Destroy(m_cascadeShadowmapBackup); m_cascadeShadowmapBackup = RwTexId.NULL; } m_cascadesReferenceCount = Math.Max(m_cascadesReferenceCount - 1, 0); if (m_cascadesReferenceCount == 0 && m_combinedShadowmapArray != RwTexId.NULL) { MyRwTextures.Destroy(m_combinedShadowmapArray); m_combinedShadowmapArray = RwTexId.NULL; } }