Пример #1
0
            public FilterLUTs(Filter filter, int size)
            {
                lutsSize = size + 1;
                step     = 1f / (float)(size);

                luts = new FilterLUT[lutsSize * lutsSize];

                for (var iy = 0; iy < lutsSize; ++iy)
                {
                    for (var ix = 0; ix < lutsSize; ++ix)
                    {
                        var x = ix * step - 0.5f + step / 2f;
                        var y = iy * step - 0.5f + step / 2f;
                        luts[ix + iy * lutsSize] = new FilterLUT(filter, x, y);
                    }
                }
            }
Пример #2
0
            public FilterLUTs(Filter filter, int size)
            {
                lutsSize = size + 1;
                step = 1f / (float)(size);

                luts = new FilterLUT[lutsSize * lutsSize];

                for (var iy = 0; iy < lutsSize; ++iy)
                {
                    for (var ix = 0; ix < lutsSize; ++ix)
                    {
                        float x = ix * step - 0.5f + step / 2f;
                        float y = iy * step - 0.5f + step / 2f;

                        luts[ix + iy * lutsSize] = new FilterLUT(filter, x, y);
                        /*std::cout << "===============================================\n";
                        std::cout << ix << "," << iy << "\n";
                        std::cout << x << "," << y << "\n";
                        std::cout << *luts[ix + iy * lutsSize] << "\n";
                        std::cout << "===============================================\n";*/
                    }
                }
            }