

Next the binary reader seeks to the start of the directory InputFile.Position = Header.DirectoryOffset NumberOfEntries = How Many Entries Are In The Wad file Magic = The WAD3's magic number sequence, in this case the 4 bytes convert to WAD3 Headers properties are DirOffset = The byte position the directory start's from Here we are storing initial information on the WAD3 file. WAD3HEADER_T.ReadStream(InputFile, Header)

Ok, so over to the code in the zip file 'Read the headerĭim Header As WAD3HEADER_T = New WAD3HEADER_T Here's more information about indexed images It seems WAD3 files use this method though much of the PNG's meta headers are removed leaving only the meta values, the image data and the palette information. The palette can be various formats including RGB and ARGB. Unlike a bitmap where the RGB values are written in the byte order they appear, each byte in an indexed PNG holds the index reference to the palette and the color stored within. When scaling up (getting closer) the software will switch the texture at 1\32 to the second smallest image and resize it from smallest 1\32 passed it's pre-rendered size at 1\16 to an elargement of 1\8 and so on.įiles such as PNG can use and indexed palette, typically up to 256 colours. this tells me that the furthest away texture will be resized to a maximum of 1\32 and minimum of 0. In a wad3 file there are four images 1 1\4 1\16 and 1\64. The 3d enine will select which texture (Images in MipMaps are textures) to apply to the surface depending on the mathmatical distance from the user. Each MipMap contains several images from full size down to really small. MipMaps as a collection of pre-rendered images to save processing time (Furher away textures have less pixels to process) and reduce the effects of antialiasing.
