Example #1
0
        void Start()
        {
            blurButton.onClick.AddListener(ApplyBlur);

            map = new BlurField <FloatValue>(FloatType.instance, scale);
            map.DefineGrid(10, 10, new FloatValue {
                v = -0.5f, r = 10
            });
            map.DefineGrid(20, 20, new FloatValue {
                v = 0.3f, r = 8
            });
            map.DefineGrid(15, 15, new FloatValue {
                v = 0.5f, r = 8
            });
            map.MapOutPredefinedGrids();
            InitializePanels();
        }
Example #2
0
        public void Construct()
        {
            field = new BlurField <Correction>(CorrectionType.instance, state.size);

            foreach (CorrectionGrid grid in state.grids)
            {
                field.DefineGrid(grid.p.x, grid.p.y, grid.c);
            }

            field.MapOutPredefinedGrids();
            field.Blur(state.blur);

            Corrected    = false;
            FieldUpdated = true;
        }