Browse Prior Art Database

Method for applying mipmap filtering to a texture that has a size not a power of 2

IP.com Disclosure Number: IPCOM000008170D
Publication Date: 2002-May-22
Document File: 4 page(s) / 67K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method for applying mipmap filtering to a texture that has a size not a power of 2. Benefits include improved performance.

This text was extracted from a Microsoft Word document.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 50% of the total text.

Method for applying mipmap filtering to a texture that has a size not a power of 2

Disclosed is a method for applying mipmap filtering to a texture that has a size not a power of 2. Benefits include improved performance.

Background

              Texture mapping is a computer graphics process that, conceptually, involves the projection of an image onto a surface followed by the geometric transformation of the surface to screen space. Ideally, this process results in each element of the texture image (texel) being projected exactly onto a pixel of the surface in screen space. The value of the texel can be used directly to process the pixel. For example, if the image is an array of colors, the texel value can be used as the pixel color in subsequent processing.

              An ideal projection is extremely rare. Some number of full and partial texels may be mapped onto a single pixel. A single texel may be mapped onto a number of full and partial pixels. The graphics system must compute, for each pixel, a value that is representative of the set of texels that map to the pixel. Most contemporary graphics hardware uses a process known as mipmapping to deal with the case when multiple texels map to a single pixel.

              In the mipmapping process, the original image is preprocessed to produce a series of smaller and smaller images. Each image is exactly half the resolution in each dimension of the image from which it is derived. The process stops when a resolution of 1 in each dimension is reached. Each image is a filtered representation of the higher resolution image from which it is derived. Each texel in a low-resolution image represents an average of some set of texels in the next higher resolution image. The requirement that each smaller image must be exactly half the resolution of the image from which it is derived leads to the requirement that the original image must have a resolution in each dimension that is a power of 2. Typically, each dimension may have a different resolution.

              Each of the images produced is assigned a level. The original image is level 0. The next smaller image is level 1, and so on. For example, an original, level-0 image might have a resolution of 32x32 texels. The complete set of images forming the mipmap includes images of levels 1 through 5 with resolutions of 16x16, 8x8, 4x4, 2x2 and 1x1 respectively. The mipmap of an original, level-0 image with a resolution of 16x4 also has images with resolutions of 8x2, 4x1, 2x1 and 1x1.

              The mipmap is used in the following way. For each screen-space pixel, a level-of-detail value, l, is computed. The l value is used to select one or two levels of the mipmap that come closest (in some measure) to representing an ideal projection of the image onto the screen space pixel.

                                                                                                               (1)

where

                                                                                                                                   (2)

and

                                                                                     (3)

              Value is the level of the 1x1 image of the mipmap. Valuesand y are the screen space coordinates of the pixel. Let s(x,y) be the function that associates an s texture coordinate with each set of (x,y) screen space coordinate...