摘要:
A graphics system including a selectable mode filter for improved texture mapping. An x, y pixel coordinate is mapped into a u, v texture map. The mapped u, v coordinate includes integer and fractional portions. Depending on the location of the coordinate relative to the four nearest texels, which are represented as integers, one of several texture mapping schemes are used to either select or calculate the texel value to be used to render the pixel at the x, y screen location. The three texture mapping schemes include point sampling in which the nearest texel from the texture map is selected, two-texel averaging in which the closest two texels are combined in a weighted average, and four-texel averaging in which the closest four texels are combined in a weighted average. By providing a selectable filter than can perform point sampling or two or four-texel averaging, the speed benefit of point sampling can be approached as well as the superior quality of two and four-texel averaging.
摘要:
A software graphics engine includes a selectable mode filter for improved texture mapping. An x, y pixel coordinate is mapped into a u, v texture map. The mapped u, v coordinate includes integer and fractional portions. Depending on the location of the coordinate relative to the four nearest texels, which are represented as integers, one of several texture mapping schemes are used to either select or calculate the texel value to be used to render the pixel at the x, y screen location. The three texture mapping schemes include point sampling in which the nearest texel from the texture map is selected, two-texel averaging in which the closest two texels are combined in a weighted average, and four-texel averaging in which the closest four texels are combined in a weighted average. By providing a selectable filter than can perform point sampling or two or four-texel averaging, the speed benefit of point sampling can be approached as well as the superior quality of two- and four-texel averaging.
摘要:
A graphics subsystem includes hardware and/or software for permitting mip-maps to be dynamically switched based upon depth (Z) values. In addition, the system generates a SHIFT signal to permit automatic adjustment of texture parameters to facilitate retrieval of texture maps. The system includes a mip-map select logic or routine that compares the depth value of a pixel to be rendered with predetermined depth values. The depth values may be stored in a plurality of depth registers, and compared with the depth value of a pixel in a plurality of associated comparators. A mip-map is selected based upon the comparisons, and the SHIFT signal is generated to indicate the order of change with respect to a base reference mip-map. A texture engine receives the SHIFT signal and uses the associated base address of the selected mip-map and shifted texture parameters to define an address for the texture map.
摘要:
A texture value determining (TVD) circuit approximates non-homogenous 2nd order perspective texture mapping to provide texture for a polygon using linear interpolation and input parameters. The TVD circuit of the present invention includes a vertical walk subcircuit and an orthogonal walk subcircuit. The vertical walk subcircuit determines texture coordinates, u(a.sub.0,n) and v(a.sub.0,n) that represent the pixels along a vertical main slop of a triangle polygon. The orthogonal walk subcircuit determines texture coordinates, u(a.sub.m,n) and v(a.sub.m,n), for orthogonally walked polygon coordinate positions for which m>0. The orthogonally walked coordinate positions represent individual scan lines. The vertical walk subcircuit of the TVD circuit includes adders, latches, and accumulators. Each element of the vertical walk subcircuit receives a vertical main slope clock (n-clock) signal. An output of the vertical walk subsystem is computed based on the relationship,u(a.sub.0,n)=u(a.sub.0, n-1)+du.sub.main +(n-1)d.sup.2 u.sub.main for m=0, n>0where du.sub.main and d.sup.2 u.sub.main are input parameters. The orthogonal walk subcircuit also includes adders, latches, and accumulators. The orthogonal walk subcircuit is clocked by an orthogonal walk (m-clock) signal as well as the n-clock signal. An output of the orthogonal walk subcircuit is computed based on the relationship,u(a.sub.m,n)=u(a.sub.m-1, n)+n(du.sub.ortho-ADD)+du.sub.ortho +(m-1)d.sup.2 u.sub.ortho for m>0where du.sub.ortho -ADD and du.sub.ortho and d.sup.2 u.sub.ortho are input parameters.
摘要:
In a computer system having a host processor, a peripheral graphics device, a display screen, and a memory, a non-homogenous second order perspective texture mapping process. Polygon coordinates, a.sub.m,n, defining a texture polygon, are received. Initial values are received for a set of parameters including u.sub.main, v.sub.main, dv.sub.ortho, dv.sub.main, du.sub.ortho, du.sub.main, d.sup.2 u.sub.ortho, d.sup.2 u.sub.main, d.sup.2 v.sub.ortho, d.sup.2 v.sub.main, du.sub.ortho-ADD, and dv.sub.ortho-ADD. The texture polygon includes span regions. A span value, j, is set to an initial value to designate an initial span region of the texture polygon in (m, n) polygon coordinate space. The total number of rows, n.sub.max, is determined for the current span region of the polygon. The total number of polygon coordinates, m.sub.max, in the current row, n, of the texture polygon is determined. An (x, y) display coordinate, corresponding to the current polygon coordinate, a.sub.m,n, is set by translating from (m, n) polygon space to (x, y) display coordinate space. Texture coordinates, u(a.sub.m,n) and v(a.sub.m,n), are determined, according to the present invention, for each polygon coordinate, a.sub.m,n, using linear interpolation based on a set of relationships that utilize the above parameters without using a repetitive divide operation. A display pixel of a color determined according to texture coordinates, u(a.sub.m,n) and v(a.sub.m,n), is rendered on a display screen at the determined (x, y) position.
摘要:
A graphics system includes a graphics controller for rendering polygons with texture using an improved MIP mapping technique. The graphics controller includes a polygon engine for rendering the pixels in a polygon and a texture map engine for selecting texture elements (“texels”) from an appropriate texture map to be applied to the pixels rendered by the polygon engine. The texture map engine generates texel coordinate values from pixel coordinate values provided by the polygon engine. The appropriate texture map is selected from a set of texture maps each varying from the others by the level of detail of the texture in each map. The graphics controller selects the appropriate level of detail texture map to use to increase speed, efficiency, and realism quality of the graphics system. The determination as to which level of detail texture map is appropriate is made by computing the area bounded by adjacent texel coordinates generated by the texture map engine. In one embodiment, vectors are defined for each the adjacent texels and the area is determined from the magnitude of the cross product of the vectors. An embodiment of the invention includes software for calculating the area bounded by adjacent texel coordinates and for comparing the area to a range of values. The software also selects an appropriate texture map based on the results of the comparison.
摘要:
Graphics software renders polygons with texture using an improved MIP mapping technique in which texels from multiple MIP maps are blended together. The software renders the pixels in a polygon and selects texture elements (“texels”) from an appropriate texture map to be applied to the pixels. The software further generates texel coordinate values to select texel values from a set of texture maps, each map varying from the others by the level of detail of the texture. The software then computes a scale factor for each texel value according an area bounded by adjacent texel coordinates. In one embodiment, vectors are defined for each the adjacent texels and the area is determined from the magnitude of the cross product of the vectors. The scale factor is then used to compute a weighted average of texels from one or more MIP maps. Further, for certain area values, no averaging occurs or, alternatively, the scale factor is set to 1.0.