コード例 #1
0
        /// <summary>
        /// Downscales the source to 1/4th size, using mipmaps
        /// !! IMPORTANT !! you cannot just switch function call. Also changing RTs is necessary.
        /// </summary>
        protected void GenerateDownscale4(Texture sourceMod, Texture sourceDiv, Texture destination, MyEffectScale effect)
        {
            effect.SetTechnique(MyEffectScale.Technique.Downscale4);

            MyRender.SetRenderTarget(destination, null);

            effect.SetSourceTextureMod(sourceMod);
            effect.SetSourceTextureDiv(sourceDiv);
            //effect.SetLumTexture(currentFrameAdaptedLuminance);
            effect.SetHalfPixel(sourceMod.GetLevelDescription(0).Width, sourceMod.GetLevelDescription(0).Height);

            MyRender.GetFullscreenQuad().Draw(effect);
        }
コード例 #2
0
        private void Upscale4To2(Texture down4, Texture down2, MyEffectScale effect)
        {
            effect.SetTechnique(MyEffectScale.Technique.HWScale);

            PostProcess(down4, down2, effect);
        }