protected override void Draw(GameTime gameTime) { GraphicsDevice.SetRenderTarget(renderTarget1); GraphicsDevice.Clear(Color.CornflowerBlue); base.Draw(gameTime); /*if (flipflop) * { * opac -= ((float)gameTime.ElapsedGameTime.TotalSeconds); * if (opac <= 0f) * { * flipflop = !flipflop; * } * } * else * { * opac += ((float)gameTime.ElapsedGameTime.TotalSeconds); * if (opac >= 1f) * { * flipflop = !flipflop; * } * }*/ GraphicsDevice.SetRenderTarget(renderTarget2); GraphicsDevice.Clear(Color.Black); SpriteBatch.Begin(SpriteSortMode.Immediate); effect.CurrentTechnique.Passes[0].Apply(); effect.Parameters["palette"].SetValue(palette); effect.Parameters["tex_width"].SetValue((float)palette.Width); effect.Parameters["tex_height"].SetValue((float)palette.Height); SpriteBatch.Draw((Texture2D)renderTarget1, Vector2.Zero, Color.White); SpriteBatch.End(); GraphicsDevice.SetRenderTarget(null); SpriteBatch.Begin(samplerState: SamplerState.PointWrap); SpriteBatch.Draw((Texture2D)renderTarget2, dest, Color.White); Console.Draw(); SpriteBatch.End(); }