コード例 #1
0
        public void TestMipmapGen()
        {
            var original = new Texture3D(IO.LoadImage(TestData.Directory + "checkers3d.dds"));
            var tex      = original.CloneWithoutMipmapsT();

            // check first two slices
            TestData.TestCheckers3DLevel0(tex.GetPixelColors(0));

            // gen mipmaps
            tex = tex.GenerateMipmapLevelsT(3);

            TestData.TestCheckers3DLevel0(tex.GetPixelColors(0));
            TestData.TestCheckers3DLevel1(tex.GetPixelColors(1));
            TestData.TestCheckersLevel2(tex.GetPixelColors(2));
        }