public override void Start() { _passes = new PostProcessPass[9]; _passCounter = 0; // Setup PostProcess. var bloomPass = new BloomPass(); bloomPass.Settings = new BloomSettings("Côôl", 0.15f, 1f, 4.0f, 1.0f, 1f, 1f); AddPass(bloomPass); AddPass(new C64FilterPass()); var cgaPass = new CGAFilterPass(); cgaPass.SetPalette(cgaPass.Palette2LI); AddPass(cgaPass); var convolutionPass = new ConvolutionPass(); AddPass(convolutionPass); var filmPass = new FilmPass(); AddPass(filmPass); var fxaaPass = new FXAAPass(); AddPass(fxaaPass); AddPass(new GrayScalePass()); var refractionPass = new RefractionPass(); refractionPass.RefractionTexture = Application.Content.Load <Texture2D>("Textures/hexagrid"); refractionPass.TextureTiling = new Vector2(0.5f); AddPass(refractionPass); _simpleBlurPass = new SimpleBlurPass(); AddPass(_simpleBlurPass); // Setup UI var elementsCount = _passes.Length + 1; var titles = new string[] { "None", "Bloom", "C64 Filter", "CGA Filter", "Convolution", "Film", "FXAA", "GrayScale", "Refraction", "Simple Blur" }; _boxRect = new Rectangle(Screen.VirtualWidth - 190, 10, 180, 45 * (_passes.Length + 1)); _widgets = new Widget[elementsCount]; for (int i = 0; i < elementsCount; i++) { _widgets[i] = new Widget(); _widgets[i].Name = titles[i]; if (i == 0) { _widgets[i].Rect = new Rectangle(_boxRect.X + 10, _boxRect.Y + 30, _boxRect.Width - 20, 30); } else { _widgets[i].Rect = new Rectangle(_boxRect.X + 10, _widgets[i - 1].Rect.Y + 40, _boxRect.Width - 20, 30); } } _activePassIndex = 0; }
internal void addPass(FilmPass effectFilm) { throw new NotImplementedException(); }