public static void RegisterDebug(DeviceContext context, string name, RenderTargetSet debuggedRT, int rtNum = 0) { if (m_AvailableModes.Contains(name)) { if (m_CurrentDebugSurface == name) { if (m_CurrentDebugMode == "A") { PostEffectHelper.CopyAlpha(context, m_DebugRenderTarget, debuggedRT, rtNum); } else if (m_CurrentDebugMode == "FRAC") { PostEffectHelper.CopyFrac(context, m_DebugRenderTarget, debuggedRT, rtNum); } else if (m_CurrentDebugMode == "RGBGamma") { PostEffectHelper.CopyGamma(context, m_DebugRenderTarget, debuggedRT, rtNum); } else { PostEffectHelper.Copy(context, m_DebugRenderTarget, debuggedRT, rtNum); } } } else { m_IsUIRebuildRequired = true; m_AvailableModes.Add(name); } }