예제 #1
0
        static bool SwizzledA8(int height, int width, int depth, byte[] src_data, uint[] dest_data)
        {
            Swizzler swz = new Swizzler((uint)width, (uint)height);

            for (int y = 0; y < height; y++)
            {
                for (int x = 0; x < width; x++)
                {
                    dest_data[(y * width) + x] = (uint)(src_data[swz.Swizzle((uint)x, (uint)y, (uint)depth)] << 24);
                }
            }

            return(true);
        }
예제 #2
0
        static bool SwizzledAY8(int height, int width, int depth, byte[] src_data, uint[] dest_data)
        {
            Color    color = new Color();
            Swizzler swz   = new Swizzler((uint)width, (uint)height);

            int index = 0;

            for (int y = 0; y < height; y++)
            {
                for (int x = 0; x < width; x++, index = (y * width) + x)
                {
                    color.A          = color.R = color.G = color.B = src_data[swz.Swizzle((uint)x, (uint)y, (uint)depth)];
                    dest_data[index] = color;
                }
            }

            return(true);
        }
예제 #3
0
파일: DXT.cs 프로젝트: CodeAsm/open-sauce
		static bool SwizzledAY8(int height, int width, int depth, byte[] src_data, uint[] dest_data)
		{
			Color color = new Color();
			Swizzler swz = new Swizzler((uint)width, (uint)height);

			int index = 0;
			for (int y = 0; y < height; y++)
			{
				for (int x = 0; x < width; x++, index = (y * width) + x)
				{
					color.A = color.R = color.G = color.B = src_data[swz.Swizzle((uint)x, (uint)y, (uint)depth)];
					dest_data[index] = color;
				}
			}

			return true;
		}
예제 #4
0
파일: DXT.cs 프로젝트: CodeAsm/open-sauce
		static bool SwizzledA8(int height, int width, int depth, byte[] src_data, uint[] dest_data)
		{
			Swizzler swz = new Swizzler((uint)width, (uint)height);

			for (int y = 0; y < height; y++)
				for (int x = 0; x < width; x++)
					dest_data[(y * width) + x] = (uint)(src_data[swz.Swizzle((uint)x, (uint)y, (uint)depth)] << 24);

			return true;
		}