1. Field of the Invention
The present invention is generally directed to computing operations performed in computing systems, and more particularly directed to graphics processing tasks performed in computing systems.
2. Related Art
A graphics processing unit (GPU) is a complex integrated circuit that is specially designed to perform graphics processing tasks. A GPU may, for example, execute graphics processing tasks required by an end-user application, such as a video game application. In such an example, there are several layers of software between the end-user application and the GPU.
The end-user application communicates with an application programming interface (API). An API allows the end-user application to output graphics data and commands in a standardized format, rather than in a format that is dependent on the GPU. Several types of APIs are commercially available, including DirectX® developed by Microsoft Corp. and OpenGL® developed by Silicon Graphics, Inc. The API communicates with a driver. The driver translates standard code received from the API into a native format of instructions understood by the GPU. The driver is typically written by the manufacturer of the GPU. The GPU then executes the instructions from the driver.
Typically, GPUs also support a concept known as texture filtering. Texture filtering is a method used to determine the texture color for a texture mapped pixel through the use of the colors of nearby pixels of the texture, or texels. The process is also referred to as texture smoothing or texture interpolation. However, high image quality texture filtering requires a high degree of computational complexity.
As an aid to reduce the amount of data needed during texture filtering, a concept of mip mapping is used whereby multiple bitmap versions of the image are stored, each version being encoded and stored at a reduced level of detail. In this manner, as the view of the image is minimized, such as moving away from the image, the displayed image is a version with a reduced level of detail. Because of this reduction in detail, texture filtering can be calculated on a version of the image with a reduced level of detail thereby not increasing the required level of computation as an image is minimized.
The simplest form of texture filtering is referred to as nearest neighbor interpolation which simply returns the color of the texel closest to the center of the requested pixel. While this method requires minimal computation, it also results in a large amounts of “blockiness” during magnification as well as aliasing and shimmering during any type of minification. Nearest neighbor interpolation can also be used with mip mapping, using the nearest mip map level according to the distance from the image. This approach aids in the reduction of aliasing and shimmering, but does not solve blockiness.
In order to solve some of these problems, a bilinear filtering concept is employed whereby instead of relying upon a single texel, the four nearest texels to the pixel in question are sampled and the colors of each texel are combined by a weighted average according to distance. This technique results in a smoothing gradient of color change from one texel to the next, instead of a sudden changer when a pixel center crosses a texel boundary.
However, where the rendering of an image changes from one mip map level to another there tends to be a very noticeable change in the quality at the boundaries between the levels which is not solved using bilinear filtering. In this situation the concept of trilinear filtering is used which involves doing a texture lookup and bilinear filtering on the two closest mip map levels, and then performing a linear interpolation of the results. This results in a smooth degradation of texture quality as distance from the viewer increases, rather than a series of steps.
Anisotropic filtering is typically the highest quality filtering available in consumer based three dimensional graphics cards. Bilinear and trilinear filtering results are correct only when the viewer is looking at the texture perpendicularly. Under these techniques an object will appear blurry when the textured surface is at an oblique angle. Anisotropic filtering corrects this error by sampling in the correct trapezoid shape according to the viewing angle and then trilinearly filtering the results.
While the more sophisticated bilinear, trilinear, and anisotropic filtering techniques produce better results they require higher amounts of computation. In addition, where the dynamic range of sampled texels is large, the required computations typically are done using floating point arithmetic solutions in order to preserve data quality. Floating point calculations require the use of floating point arithmetic logic units within a GPU which increases the associated cost and area required in a circuit to implement.
When an interpolation, such as a bilinear interpolation, is generated using normalized fixed point texel data where the range of data (i.e., the differences between the texel magnitudes) is large, there can be a loss of precision due to the limited number of bits of calculation provided in a single precision bilinear filtering unit. Such a limitation could be overcome by the use of extended precision filtering using multiple single precision bilinear filtering units which would, by operating in parallel on texel data, generate extended precision floating point texel data.
What are needed, therefore, are systems and/or methods to alleviate the aforementioned deficiencies. Particularly, what is needed is a system and method to dynamically determine when an interpolator should generate extended precision results and a bilinear filter system that could generate such results when desired.