摘要 |
The number of computations performed in rendering graphics is reduced by computing certain terms only at the beginning of each scanline. A scanline gradient is calculated once at the beginning of each scanline for each of two texture values with respect of the x-coordinate of the scanline. Following the scanline gradient calculations at the beginning of each scanline, a pixel gradient is calculated for each pixel of the scanline with respect to the y-coordinate of the scanline. The sum of the squares of the scanline gradients and the pixel gradients are compared, and the larger of the two quantities is selected to be a maximum Rho constant term for the corresponding pixel, wherein the maximum Rho constant is used to select a texture map for rendering the corresponding pixel. Furthermore, at the beginning of each scanline, a pixel gradient may be calculated for each of two texture values for a first pixel of the scanline with respect to the y-coordinate of the scanline. Derivatives are calculated for the pixel gradients, wherein pixel gradients are found using the derivatives, thereby eliminating the calculation of pixel gradients for each pixel. |