internal static void CreateScreenResources()
        {
            var width   = m_resolution.X;
            var height  = m_resolution.Y;
            var samples = RenderSettings.AntialiasingMode.SamplesCount();

            MyUtils.Init(ref MyGBuffer.Main);
            MyGBuffer.Main.Resize(width, height, samples, 0);

            MyScreenDependants.Resize(width, height, samples, 0);

            RemoveScreenResources();

            m_reduce0 = new MyUnorderedAccessTexture(width, height, Format.R32G32_Float);
            m_reduce0.SetDebugName("reduce0");
            m_reduce1 = new MyUnorderedAccessTexture(width, height, Format.R32G32_Float);
            m_reduce1.SetDebugName("reduce1");
            m_uav3 = new MyUnorderedAccessTexture(width, height, MyGBuffer.LBufferFormat);

            m_transparencyAccum    = new MyUnorderedAccessTexture(width, height, Format.R16G16B16A16_Float);
            m_transparencyCoverage = new MyUnorderedAccessTexture(width, height, Format.R8_UNorm);

            HalfScreenUavHDR         = new MyUnorderedAccessTexture(width / 2, height / 2, MyGBuffer.LBufferFormat);
            QuarterScreenUavHDR      = new MyUnorderedAccessTexture(width / 4, height / 4, MyGBuffer.LBufferFormat);
            EighthScreenUavHDR       = new MyUnorderedAccessTexture(width / 8, height / 8, MyGBuffer.LBufferFormat);
            EighthScreenUavHDRHelper = new MyUnorderedAccessTexture(width / 8, height / 8, MyGBuffer.LBufferFormat);

            m_rgba8_linear = new MyUnorderedAccessTexture(width, height, Format.R8G8B8A8_UNorm);

            m_rgba8_0 = new MyCustomTexture(width, height, BindFlags.RenderTarget | BindFlags.ShaderResource, Format.R8G8B8A8_Typeless);
            m_rgba8_0.AddView(new MyViewKey {
                Fmt = Format.R8G8B8A8_UNorm, View = MyViewEnum.RtvView
            });
            m_rgba8_0.AddView(new MyViewKey {
                Fmt = Format.R8G8B8A8_UNorm_SRgb, View = MyViewEnum.RtvView
            });
            m_rgba8_0.AddView(new MyViewKey {
                Fmt = Format.R8G8B8A8_UNorm_SRgb, View = MyViewEnum.SrvView
            });

            m_rgba8_1 = new MyRenderTarget(width, height, Format.R8G8B8A8_UNorm_SRgb, 1, 0);
            m_rgba8_2 = new MyRenderTarget(width, height, Format.R8G8B8A8_UNorm_SRgb, 1, 0);
            if (samples > 1)
            {
                m_rgba8_ms = new MyRenderTarget(width, height, Format.R8G8B8A8_UNorm_SRgb, samples, 0);
            }
            m_prevLum = new MyUnorderedAccessTexture(1, 1, Format.R32G32_Float);

            Debug.Assert(PostProcessedShadows == RwTexId.NULL);
            Debug.Assert(CascadesHelper == RwTexId.NULL);
            PostProcessedShadows = MyRwTextures.CreateUavRenderTarget(width, height, Format.R8_UNorm);
            CascadesHelper       = MyRwTextures.CreateRenderTarget(width, height, Format.R8_UNorm);

            m_gbuffer1Copy = MyRwTextures.CreateScratch2D(width, height, Format.R8G8B8A8_UNorm, samples, 0, "gbuffer 1 copy");
        }