Graphical texture mapping method and apparatus

CN114782607BActive Publication Date: 2026-07-07ARM LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ARM LTD
Filing Date
2022-01-05
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In graphics processing systems, existing techniques use approximations when performing anisotropic filtering, leading to visual artifacts and making it difficult to accurately determine texture sampling locations, resulting in image blurring and errors.

Method used

By determining the number of sample locations in the texture, the anisotropy is accurately calculated using the square root of the coefficients F of the elliptic function. This optimizes the texture sampling process, including determining the square roots of the elliptic coefficients A, B, C, and F, and combining mipmap-level trilinear sampling to improve sampling accuracy.

Benefits of technology

It improves the texture mapping accuracy in graphics processing systems, reduces visual artifacts, enhances image quality, and simplifies the hardware implementation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782607B_ABST
    Figure CN114782607B_ABST
Patent Text Reader

Abstract

The invention is entitled "Graphics Texture Mapping". When performing anisotropic filtering when sampling a texture to provide output sample texture values used in rendering output in a graphics processing system, the number of positions at which the texture is to be sampled along an anisotropic direction in the texture along which samples are to be taken in the texture is determined by determining the square root of the coefficients F of an ellipse of the form Ax 2 + Bxy + Cy 2 = F, the ellipse corresponding to a projection onto a surface to which the texture is to be applied of a sample point at which the texture is sampled, and using the determined square root of the coefficients F of the ellipse to determine the number of positions at which samples should be taken in the texture along the anisotropic direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and apparatus for performing texture mapping in a graphics processing system. Background Technology

[0002] In a graphics processing system, so-called textures or texture data are applied to the surface to be drawn to generate colors (and other data) for sampling locations in the rendered output (such as an image to be displayed).

[0003] Computer graphics textures are typically configured as arrays of texture data elements (texels), each with a corresponding texture dataset (such as color, brightness, and / or light / shadow). The sampling locations in the rendered output where the texture is applied are then mapped to corresponding locations in the texture and the texture sampled at those locations using an appropriate filtering process (such as bilinear filtering) to determine the texture data to be used for the sampling locations in the rendered output.

[0004] The problem with texture mapping in graphics processing is that the surface to which the texture is applied is at an oblique angle relative to the viewpoint (camera). In such cases, the “projection” (and therefore the sampled texture) of the sampling position seen from the viewpoint onto the surface (assuming that the sampled point is projected as a circle) will not be circular (if the surface is perpendicular to the view direction), but will be elliptical (where the size of the ellipse is determined by the angle of the surface relative to the view direction).

[0005] Figure 1 This is illustrated, and an exemplary render output 1 is shown, which corresponds to the plane of the screen where the image will be displayed, and includes multiple sampling locations (pixels) 2 (assumed to be circular), and, for example, will need to take corresponding texture samples to render the pixels properly. Figure 1 This is a simplified illustration of a small portion of pixel 2 in render output 1. It should be understood that the entire area of ​​render output 1 will include the appropriate pixel array.

[0006] Figure 1 It also shows a "camera" 3 corresponding to the viewpoint of the rendered output.

[0007] like Figure 1 As shown, for an exemplary pixel 4 of a 3D surface 5 that is sampled at an angle to the view direction from camera 3, the effective projection of the view “cone” 6 of the view “cone” 6 projected from camera position 3 through the (circular) pixel 4 in the rendering output (screen) 1 at an angle to the view direction will be an ellipse 7.

[0008] In this case, simply taking a “circular” bilinear sample from the texture to be applied to the surface will result in errors, such as blurring the surface and / or creating an advantage in terms of the reproduced texture on the surface.

[0009] To address this issue, a texture sampling technique known as "anisotropic filtering" is used, in which multiple (e.g., bilinear) samples are taken along lines in the texture (often referred to as anisotropic directions) designed to correspond to the major axis of an "ellipse" (the area occupied by an ellipse), which corresponds to the projection of the sampling point onto the surface to be applied. The multiple samples taken along the lines (anisotropic directions) are centered on the texture coordinates to be sampled (which will be the center of the ellipse).

[0010] Then, for example, using a weighted average, such as based on its distance from the center of the projected “ellipse” (sampled from the texture coordinates) along the anisotropic direction, the complex (e.g., bilinear) samples taken along the anisotropic direction are appropriately combined to provide the overall output sampled texture value returned and used for the sampled points in question.

[0011] Graphical textures are known to be stored and used in the form of "mipmaps," which are sequences (chains) of progressively decreasing resolution (less detailed) versions of the texture, where each mipmap level is, for example, half the resolution (as described in the detailed description).

[0012] Mipmaps are designed to increase rendering speed and reduce synchronization artifacts. Higher resolution mipmaps are used for high-density samples, such as objects close to the viewpoint (camera), while lower resolution mipmaps are used for objects further away.

[0013] When using mipmaps (typically the desired level of detail (LOD)), they will be defined (e.g., based on the distance (camera) from the surface from which the texture is applied from the viewpoint), and the texture sampling operation will then sample the nearest mipmap to the level of detail, or sample both mipmap levels that fall on either side of the desired level of detail, and then appropriately combine the samples from the two mipmap levels (e.g., based on their relative "distance"). The latter can be accomplished using a trilinear sampling process, where bilinear filtering is used from each mipmap level, and then the two samples, one from each mipmap level, are appropriately combined (e.g., using a weighted average based on the difference between the mipmap's level of detail and the actual level of detail to be sampled) to provide the sampled texture values ​​for the output.

[0014] For example, when using the texture of an image with a resolution of 40×40 sampling locations, interpolation such as 128×128, 64×64 and 32×32 texel mipmaps, and 64×64 and 32×32 mipmaps (with trilinear interpolation) can be used.

[0015] When performing anisotropic filtering using mipmaps, an appropriate number of trilinear samples are taken along the anisotropic direction (and then appropriately combined to provide the output sample texture values ​​to be used). Therefore, in this case, bilinear samples are taken at each mipmap level along the anisotropic direction, and then the bilinear samples from each mipmap level are combined to provide appropriate trilinear sample values, which are then appropriately combined to provide the texture values ​​for the overall output sample.

[0016] Figure 2 This is illustrated, and a complex number (in this case, six) of texture samples 20 are shown along the anisotropic direction 21 corresponding to the major axis of the “ellipse” 22, corresponding to the projection of the sampling positions in a suitable pair of mipmap levels onto the surface (as discussed above), including a more detailed mipmap level 23 and a less detailed mipmap level 24. Samples from each mipmap level are then appropriately combined in pairs to provide a set of multiple trilinear samples along the anisotropic direction, and these trilinear samples are then appropriately merged accordingly to obtain the texture values ​​of the final output samples.

[0017] When performing anisotropic filtering using mipmaps, the mipmap level (LOD) for the details of the trilinear samples must be determined, including the anisotropic direction (line) the samples will take in the mipmap and the number of samples taken along the anisotropic direction.

[0018] When performing anisotropic filtering, these parameters are typically determined by finding an ellipse whose shape approximates the sampling location when projected onto the surface to which the texture is applied. The minor axis of the projected ellipse is then used to find the level of detail for sampling the texture, the major axis (direction) of the ellipse indicates the direction of lines within the texture to sample the texture (anisotropic direction), and the ratio of the major axis to the minor axis of the projected ellipse is used to determine the number of samples to be taken along the lines (anisotropic direction) in the texture.

[0019] While the projected ellipse and its corresponding ellipse parameters can be determined for the purpose of anisotropic filtering with high accuracy during anisotropic filtering, this is relatively expensive to implement in hardware. Therefore, in general methods for performing anisotropic filtering, approximations tend to be used when determining the ellipse parameters; for example, attempting to find the best match with a set of reference anisotropic directions for a given anisotropic filtering operation, rather than determining the actual anisotropic directions themselves. However, the applicant has recognized that using such approximations for anisotropic filtering can lead to visual artifacts, and specifically, can give incorrect results for the angles of the ellipse's major axis, and these errors can exhibit an angle dependence (i.e., larger for some angles than others).

[0020] The applicant believes that there is still a range of improved techniques available for performing ray tracing using graphics processors. Summary of the Invention

[0021] According to a first aspect of the invention, a method is provided for performing anisotropic filtering while sampling a texture to provide output sampled texture values ​​for rendering output in a graphics processing system, the method comprising:

[0022] When using anisotropic filtering to sample texture, output sampled texture values ​​are provided for positions x and y in the texture:

[0023] Determine the number of locations for sampling the texture along the anisotropic direction, along which the samples will be processed in the texture by the following operations:

[0024] Determine if it has the form Ax 2 +Bxy+Cy 2 =F is the square root of the coefficients F of the ellipse, the ellipse corresponding to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, where x and y are the coordinates of the position in the texture, and the output sampled texture value for that position will be provided; and

[0025] The determined square root of the elliptic coefficient F is used to determine the number of locations in the texture where samples should be acquired along the anisotropic direction;

[0026] The method further includes:

[0027] Based on the determined number of locations, one or more samples are acquired in the texture along the anisotropic direction; and

[0028] The one or more samples acquired along the anisotropic direction in the texture are used to provide an output sampled texture value for the sampled location in the texture, for use.

[0029] According to a second aspect of the invention, an apparatus is provided for performing anisotropic filtering when sampling a texture to provide output sampled texture values ​​for use when rendering output in a graphics processing system, the apparatus comprising:

[0030] The circuit for determining the number of sampling locations is configured to: when using anisotropic filtering to sample a texture to provide output sampled texture values ​​for positions x and y in the texture:

[0031] The number of locations along the anisotropic direction in which samples will be acquired in the texture is determined by the following method:

[0032] Determine if it has the form Ax 2 +Bxy+Cy 2 =F is the square root of the coefficients F of the ellipse, the ellipse corresponding to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, where x and y are the coordinates of the position in the texture, and the output sampled texture value for that position will be provided; and

[0033] The determined square root of the elliptic coefficient F is used to determine the number of locations in the texture where samples should be acquired along the anisotropic direction.

[0034] The device also includes:

[0035] A texture sampling circuit, configured to: acquire one or more samples in the texture along the anisotropic direction based on a determined number of positions; and

[0036] A sample combination circuit configured to use one or more samples acquired along the anisotropic direction in the texture to provide output sampled texture values ​​for a sampled location in the texture for use.

[0037] In these aspects, the present invention relates to determining the number of locations of samples in a texture (i.e., determining the degree of anisotropy) when performing anisotropic filtering.

[0038] In these aspects of the invention, the square root of the coefficient F from an elliptic function is used to determine the number of sample locations (anisotropy) in the texture, the elliptic function defining an ellipse as a projection of the sampling location, wherein texture values ​​will be applied to the surface of the applied texture.

[0039] As will be discussed further below, this simplifies the calculations required to determine the number of locations for the samples (anisotropy), thus making the operation more efficient and effective in hardware. In particular, the applicant has recognized that anisotropy can be determined when anisotropic filtering is performed using the square root of the elliptic coefficients F of the process, and this then allows for simpler and more efficient anisotropy determination in hardware.

[0040] In this invention, the sampled texture can be any suitable and desired texture that can be used for graphics processing and for graphics processing, and can represent and store any suitable and desired data that the texture can be used to represent in graphics processing and graphics processing systems. Therefore, the texture can represent, for example, appropriate color values ​​(e.g., RGBα values) (and in one embodiment, this is the case), but can also represent other graphics processing parameters and data that can be represented using the texture, such as brightness values, light / shadow values, depth values, etc. This invention applies regardless of the actual data on which the texture is sampled.

[0041] Correspondingly, the texture being sampled should and preferably comprises an appropriate (e.g., 2D) array of texture data elements (texels), each texture data element having an associated data (e.g., color) value. The texture values ​​of the desired sample will be indicated accordingly by indicating the appropriate location or position within the texture (texture coordinates) of the texture to be sampled, to provide the output sampled texture values ​​required for the graphics processing texturing operation in question.

[0042] The sampled texture is preferably provided as multiple mipmaps (mipmap levels), where each mipmap level is progressively less detailed than the previous level. The set of texture mipmaps may include only two mipmap levels, but preferably includes more than two mipmap levels, for example, extending from the most detailed mipmap level through progressively less detailed mipmap levels to at least a detailed mipmap level, such as including a single texture. Typically, the texture mipmap levels can be arranged and configured as needed, for example, and preferably organized and configured according to the mipmap levels of the graphics processor and graphics processing system and / or the application requiring graphics processing.

[0043] This invention relates to the case of anisotropically sampled textures. In this case, as described above, (multiple) samples are taken along the anisotropic direction and appropriately used (combined) to provide the sampled texture values ​​for output.

[0044] In these aspects, the present invention determines the number of sample locations (using multiple samples) by assuming that the sampling locations (points) using texture values ​​will be projected as ellipses onto the surface on which the texture is being applied.

[0045] Therefore, the anisotropic filtering process is configured and operates to sample based on an estimated elliptical coverage area within the texture, the estimated elliptical coverage area being designed to correspond to the projection of the sampling point onto the surface on which the texture is being applied.

[0046] To facilitate this, the invention includes (and the texture sampling device includes) one or more parameters configured to determine one or more parameters of an ellipse, the ellipse being estimated and intended to correspond to a projection of the texture being sampled onto the surface at the sampling location (point), and specifically, appropriate parameters of the ellipse can be used to appropriately control the anisotropic filtering process.

[0047] More specifically, in these aspects, the invention assumes that the projection of the sampling position onto the surface will be an ellipse of the form:

[0048] Ax 2 +Bxy+Cy 2 =F

[0049] Where A, B, C, and F are elliptic coefficients, and x and y are the texture coordinates (in texture space) of the "sampled" location in the texture.

[0050] The present invention determines, in particular, the square root of the elliptic coefficient F, and uses the square root of the elliptic coefficient F when determining the number of sampling locations in the texture during the execution of the anisotropic filtering.

[0051] The square root of the elliptic coefficient F can be determined in any suitable and desirable manner.

[0052] For example, the elliptic coefficient F can be determined by first determining the elliptic coefficient F and then determining the square root of the determined coefficient F. In this case, the elliptic coefficient F can be determined based on the derivative of the texture coordinates, but preferably by the elliptic coefficients A, C, and B (rather than directly from the derivative of the texture coordinates), and preferably by the elliptic coefficients A, B, and C as follows:

[0053] F=A C-(B^2) / 4

[0054] In a particularly preferred embodiment, the square root of the coefficient F is determined directly (without first (and preferably, all) determining the coefficient F).

[0055] In this case, in a particularly preferred embodiment, the square root of the elliptic coefficient F is determined by derivatives of the texture coordinates in the X and Y directions in which the rendered output is generated. These derivatives are preferably expressed according to the texture coordinate space such that they indicate the difference between the texture coordinates (texture number) at a sampling location in screen space and the texture coordinates at the next sampling location in screen space in the X and Y directions, respectively.

[0056] Therefore, in a preferred embodiment, the derivatives dTdx of the “X” texture coordinates and dtd of the “Y” texture coordinates are determined and then used to determine the square root of the elliptic coefficients F (and the device includes circuitry or circuitry configured to determine these derivatives).

[0057] The derivatives of the texture coordinates in the X and Y directions in screen space can be determined in any suitable and desirable manner. This is preferably accomplished by determining the derivatives of the texture coordinates of adjacent sampling positions in the X and Y directions in screen space, respectively.

[0058] The texture coordinate derivative can be used to determine the elliptic coefficients F in any suitable and desired manner. In a preferred embodiment, the square root of the elliptic coefficients F(f_sqrt) is determined from the texture coordinate derivative as follows:

[0059] F_sqrt = abs (dTdx.y dTdy.x - dTdx.x dTdy.y)

[0060] Where x and y are the positions in the texture where the sampled texture values ​​need to be output.

[0061] In a particularly preferred embodiment, and in addition to determining the square root of the elliptic coefficient F, the elliptic coefficients A, B, and C are also determined. Preferably, as will be discussed further below, the elliptic coefficients A, B, and C, and especially the square root of the elliptic coefficient F, are then used to determine (when determined) the number of locations to be sampled in the texture when performing the anisotropic filtering.

[0062] Therefore, the present invention preferably also determines the elliptic coefficients A, B, and C, and uses those coefficients to determine (when determined) the number of locations to be sampled when performing anisotropic filtering.

[0063] The elliptic coefficients A, B, and C can be determined in any suitable and desired manner. In a particularly preferred embodiment, they are determined by derivatives of the texture coordinates in the X and Y directions from which the rendered output is generated.

[0064] The texture coordinate derivatives can be used to determine the elliptic coefficients A, B, and C in any suitable and desired manner. In a preferred embodiment, the elliptic coefficients A, B, and C are determined from the texture coordinate derivatives as follows:

[0065] A = dTdx.y 2 + dTdy.y 2

[0066] B = -2 (dTdx.x dTdx.y + dTdy.x dTdy.y

[0067] C = dTdx.x 2 + dTdy.x 2

[0068] Where x and y are the positions in the texture where the sampled texture values ​​need to be output.

[0069] The square root of the elliptic coefficient F can determine the number of locations (degree of anisotropy) for a sample in any suitable and desirable manner.

[0070] In a particularly preferred embodiment, the square root of the elliptic coefficient F is used as a scaling factor when determining the number of sampling locations (anisotropy), i.e., such that the number of sampling locations (anisotropy) is determined by dividing the value (“dividend”) by the square root of the elliptic coefficient F. Most preferably, a scaling factor (dividend) corresponding to twice the square root of the elliptic coefficient F is used when determining and to determine the number of sampling locations (anisotropy), i.e., such that:

[0071] aniso_degree=point / (2.0 F_sqrt)

[0072] The endpoints are fixed values, and then, as explained above, scaling is performed using the square root of the elliptic coefficients F(f_sqrt); and

[0073] aniso_degree is the anisotropy degree (i.e., the number of specific locations in the sampled texture).

[0074] In these arrangements, the value of the square root scaling using the elliptic coefficient F (“splitter”) can be determined in any suitable and desired manner. In a particularly preferred embodiment, it is determined using the elliptic coefficients A, B, and C.

[0075] The elliptic coefficients A, B, and C can be used to determine the values ​​to be divided (scaled) by the square root of F (scaled proportionally) to determine the number of locations of the sample in any suitable and desired manner (degree of anisotropy).

[0076] In a particularly preferred embodiment, the elliptic coefficients A, B, and C are used to determine the values ​​to be divided (scaled proportionally) by the square root of F to determine the number of sample locations (anisotropy) as follows:

[0077] root = sqrt ((AC)^2 + B^2)

[0078] dividend = A + C + root

[0079] Where A, B, and C are the elliptic coefficients of the ellipse, which is the projection of the screen-space sampling position onto the surface to which the texture is to be applied (as described above); and

[0080] The number of sample locations (anisotropy) is determined by dividing the value of the square root of F (scaling).

[0081] Therefore, in a particularly preferred embodiment, the elliptic coefficients A, B, and C, as well as the square root of the elliptic coefficient F, are used to determine the number of sample locations (anisotropy) as follows:

[0082] aniso_degree=(A + C + root) / (2.0 F_sqrt)

[0083] Where A, B, and C are the elliptic coefficients of the ellipse, which is the projection of the screen space sampling position onto the surface to which the texture is to be applied (as described above).

[0084] F_sqrt is the square root of the elliptic coefficient F of the ellipse, which is the projection of the screen space sampling position onto the surface to which the texture is to be applied (as described above).

[0085] root = sqrt ((AC)^2 + B^2)

[0086] and

[0087] aniso_degree is the anisotropy degree (i.e., the number of specific locations in the sampled texture).

[0088] The applicant has found that anisotropy can be determined correctly and sufficiently precisely in this manner, and that anisotropy can be determined from the square root of the elliptic coefficient F and the square root of the elliptic coefficient F, and that this provides a more efficient mechanism and process for determining anisotropy in hardware.

[0089] In a preferred embodiment, if, for any reason, the determined anisotropy degree is not a significant number, then the anisotropy degree is preferably set (clamped) to "1". Therefore, in a preferred embodiment:

[0090] if(isnan (aniso_degree)) aniso_degree=1

[0091] Furthermore, in a particularly preferred embodiment, a specific, preferably selected, preferably predetermined maximum value is set for the anisotropy degree (sample size), and the anisotropy degree determined according to the ellipticity coefficient is set (clamped) to the set maximum value; if it exceeds the maximum value, i.e.:

[0092] if(aniso_degree > max_aniso) aniso_degree =max_aniso

[0093] The maximum anisotropy is set by max_aniso.

[0094] The determined anisotropy is restricted to no more than the set maximum anisotropy set. In fact, when sampling the texture, a cap is applied to the number of sampling locations, and thus when anisotropic filtering is performed, sampling is performed on the cap of the texture sampling cost.

[0095] The location of the maximum set (allowed) number of samples that can be sampled when performing anisotropic filtering can be set for this purpose in any suitable and desired manner and by any suitable and desired element or component of the system.

[0096] For example, there may be a maximum (supported) anisotropy degree of the graphics processor texture mapping circuitry (hardware) (which is allowed to sample) discussed in this paper (i.e., the maximum number of locations that can be sampled along the anisotropic direction when performing anisotropic filtering).

[0097] The maximum anisotropy supported in this respect can be set and selected in any suitable and desired manner, and for any suitable and desired element or component of the system. It will typically be set (fixed) along with the hardware of the processor in question (because it will be determined by the maximum precision that the hardware is capable of handling for the computation in question, which will be fixed for the hardware). An exemplary suitable maximum supported anisotropy is 16. Of course, other arrangements will be possible.

[0098] In this case, the location where the maximum allowed number of samples can be sampled when performing anisotropic filtering can be, for example, simply the maximum supported anisotropy, as described above (and in a preferred embodiment, the maximum supported anisotropy is used as the default maximum allowed number of samples that can be taken when performing anisotropic filtering, the number of samples that can be taken when any smaller maximum allowed number of samples can be sampled at the location when performing anisotropic filtering).

[0099] In a particularly preferred embodiment, or alternatively, it may also be possible to specify the location of the maximum permissible number of samples that can be sampled when performing anisotropic filtering, which differs from the maximum anisotropy supported (intended to be set).

[0100] In a preferred embodiment of this type, applications requiring graphics processing (and therefore, in particular, texture mapping) are able to set the maximum anisotropy to be used (for this purpose). Alternatively, a maximum anisotropy setting may also be available for the graphics processor driver. For example, a default maximum value may exist, for instance, set by the driver, but applications can set lower or higher maximum values ​​for the anisotropy in use (but not higher than the maximum supported anisotropy) if needed.

[0101] In a particularly preferred embodiment, the determination of the number of samples (degree of anisotropy) is further configured to ensure that at least one sample will be taken; that is, if the determined number of samples (determined degree of anisotropy) is less than 1, the determined degree of anisotropy will be set to 1.

[0102] if(aniso_degree < 1.0) aniso_degree=1.0.

[0103] Once the number of locations (anisotropy) for the sample texture has been determined, samples should be taken along the anisotropic direction in the texture based on the determined number of locations, and preferably along the anisotropic direction. As will be discussed further below, this may include taking samples along the determined number of locations in the texture along the anisotropic direction (and in a preferred embodiment, in this case, it may include taking samples along the anisotropic direction in the texture, where the locations are different from the determined number of locations), but based on the determined number of locations (e.g., determined using the determined number of locations) (and in other embodiments, this is the case).

[0104] There may be only a single "version" of the texture to be sampled (e.g., at the mipmap level) for anisotropic filtering operations. In this case, the number of positions in the texture (mipmap) based on a determined number of positions (e.g., and preferably equal to the determined number of positions) should be sampled in an appropriate manner.

[0105] However, in a particularly preferred embodiment, the sampled texture is provided as two or more mipmaps, and the sampling of the texture includes sampling one or more appropriate mipmaps of the texture (depending on the determined number of locations to be sampled).

[0106] Therefore, in a particularly preferred embodiment, the sampled texture is provided as two or more mipmaps, and the method includes:

[0107] A pair of mipmap levels are determined, including a first more detailed mipmap level and a second more detailed mipmap level, wherein the second more detailed mipmap level acquires samples from the simulation map level and the less detailed mipmap level from the pair of mipmap levels to provide the sampled texture values ​​of the output (and preferably, samples are acquired along the anisotropic direction in the more detailed mipmap level, and the samples taken along the anisotropic direction are combined in the more detailed mipmap level and in the less detailed mipmap level to provide the output sampled texture values ​​for use).

[0108] Correspondingly, the device of the present invention preferably includes:

[0109] The mipmap level selection circuit is configured to, when using anisotropic filtering to sample to provide textures of two or more mipmaps, determine a pair of mipmap levels, including a first more detailed mipmap level and a second more detailed mipmap level, to obtain samples to provide output sampled texture values.

[0110] Furthermore, the texture sampling circuitry is configured to sample one or more (preferably more) locations along anisotropic directions at a more detailed mipmap level, and at a more detailed mipmap level.

[0111] Furthermore, the sample combination circuit is configured to combine the samples captured along the anisotropic direction at a more detailed mipmap level and a less detailed mipmap level to provide output sample texture values ​​for use.

[0112] In these embodiments of the invention, when anisotropic filtering is performed, two texture mipmap levels are sampled. One mipmap level is more detailed (i.e., includes a higher resolution (more detailed) version of the texture in question), and the other mipmap level of the two includes a less detailed (lower resolution) version of the sampled texture. Any two mipmap levels can be selected for sampling.

[0113] In a preferred embodiment, the two mipmap levels (directly) for acquiring texture samples include adjacent levels in the mipmap hierarchy.

[0114] The two mipmap levels from the sample can be selected and determined according to any suitable and desired criteria and conditions. In a preferred embodiment, they are determined based on the level of detail (LOD) of the texture to be sampled.

[0115] Preferably, mipmap levels from either side of the desired level of detail are selected and sampled from. Therefore, it is preferable to select a more detailed mipmap level, i.e., a mipmap level that is closest to the desired level of detail (but more detailed than the desired level of detail), and preferably to select a more detailed mipmap level that is closest to the desired level of detail (but less detailed than the desired level of detail) as the sample mipmap level.

[0116] The level of detail of the texture to be sampled can be determined accordingly in any suitable and desired manner. In a preferred embodiment, the texture applied to the surface is determined at least based on the projected ellipse of the sampling location on the surface.

[0117] The level of detail can be determined at least in part based on a defined length of the minor axis of the projected ellipse of the sampling point in question. The length of the minor axis of the projected ellipse of the sampling point in question can be determined in any suitable and desirable manner. In a particularly preferred embodiment, the defined length of the minor axis of the projected ellipse of the sampling point indicates the radius of the minor axis of the projected ellipse of the sampling point, and most preferably, it is the radius of the minor axis of the projected ellipse of the sampling point. Therefore, in a preferred embodiment, the level of detail is determined at least in part based on a defined radius of the minor axis of the projected ellipse of the sampling point in question.

[0118] However, in a particularly preferred embodiment, the length of the minor axis (e.g., its radius) of the projected ellipse of the sampling point in question is determined at a level of detail without specifically determining (and it is not necessary to specifically determine) it.

[0119] Most preferably, the level of detail is determined as log2 of the length of the minor axis of the projected ellipse of the sampling point in question, and preferably log2 of the minor axis of the projected ellipse in question, and preferably determined by applying one or more, preferably complex, log2 operations on the ellipse coefficients.

[0120] In a particularly preferred embodiment, the following level of detail is determined: in particular, the (determined) square root of the elliptic coefficients F is subjected to a log2 operation.

[0121] In a particularly preferred embodiment of this type, the level of detail to be used is determined to be:

[0122] lod=0.5 (2.0 log2 (F_sqrt)1.0-log2 (A + C + root))

[0123] in:

[0124] LOD is a defined level of detail;

[0125] A and C are ellipticity coefficients, which are preferably determined as described above;

[0126] F_sqrt is the square root of the elliptic coefficients F as defined above; and

[0127] The root is the parameter "root" as determined above (i.e., root=sqrt((AC)^2+B^2)).

[0128] In this regard, the applicant has recognized that the level of detail will not (and does not need to) be very high precision, and therefore can be satisfactorily determined using a basis-2 logarithm as described above. Furthermore, this form of log2 operation can be implemented relatively inexpensively in hardware (e.g., compared to a partitioning operation). Therefore, using multiple log2 operations to determine the level of detail makes it possible to determine the level of detail relatively inexpensively in hardware.

[0129] Therefore, the applicant believes that determining the level of detail at which the texture is sampled when performing anisotropic filtering (and thus selecting the mipmap level to be used when sampling the texture) can be novel and the invention itself can be novel and inventive, and not only in determining the number of locations of samples in the texture in the manner discussed above.

[0130] Therefore, according to a third aspect of the invention, a method is provided for performing anisotropic filtering when sampling a texture to provide output sampled texture values ​​for use when rendering output in a graphics processing system, the method comprising:

[0131] When the samples are provided as textures of two or more mipmaps, anisotropic filtering is used to provide the output sampled texture values ​​at positions x and y in the texture:

[0132] The level of detail to be sampled for the texture is determined using the following method:

[0133] Determine if it has the form Ax 2 +Bxy+Cy 2 =F is the square root of the coefficients F of the ellipse, the ellipse corresponding to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, where x and y are the coordinates of the position in the texture, and the output sampled texture value for that position will be provided; and

[0134] The level of detail of the texture to be sampled is determined by using the determined square root of the elliptic coefficient F with a log2 operation (and preferably by determining the level of detail of the texture in the following way:

[0135] Determine if it has the form Ax 2 +Bxy+Cy 2 The coefficients A, B, C of the ellipse = F and the square root of the coefficient F correspond to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, where x and y are the coordinates of the position in the texture to which the output sampled texture values ​​are to be provided; and

[0136] One or more log2 operations are used on the square roots of the determined elliptic coefficients A, B, C, and F to determine the level of detail of the samples taken at the determined elliptic coefficients a, B, C, and the square roots, the level of detail being sampled at the mass spectrometer (and preferably by determining the level of detail of the samples of the texture as:

[0137] lod=0.5 (2.0 log2 (F_sqrt)+1.0-log2 (A + C + root))

[0138] in:

[0139] LOD is a defined level of detail;

[0140] F_sqrt is the square root of the elliptic coefficients F; and

[0141] root = sqrt ((AC)^2 + B^2)

[0142] The method further includes:

[0143] The determined level of detail is used to select one or more of the mipmap levels of the texture, thereby obtaining samples to provide sampled texture values ​​for the output;

[0144] Sample or sample at one or more locations along an anisotropic direction in the texture at one or more selected mipmap levels; and

[0145] The samples or samples taken along the anisotropic directions in the one or more mipmap levels are used to provide output sampled texture values ​​for the locations sampled in the texture.

[0146] According to a fourth aspect of the invention, an apparatus is provided for performing anisotropic filtering when sampling a texture to provide output sampled texture values ​​for use when rendering output in a graphics processing system, the apparatus comprising:

[0147] The level of detail determination circuit is configured to: when anisotropically filtered samples are provided as textures of two or more mipmaps to provide output sampled texture values ​​for positions x, y in the texture:

[0148] The level of detail to be sampled for the texture is determined using the following method:

[0149] Determine if it has the form Ax 2 +Bxy+Cy 2 =F is the square root of the coefficients F of the ellipse, the ellipse corresponding to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, where x and y are the coordinates of the position in the texture, and the output sampled texture value for that position will be provided; and

[0150] The level of detail of the texture to be sampled is determined by using the determined square root of the elliptic coefficient F with a log2 operation (and preferably by determining the level of detail of the texture in the following way:

[0151] Determine if it has the form Ax 2 +Bxy+Cy 2 The coefficients A, B, C of the ellipse = F and the square root of the coefficient F correspond to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, where x and y are the coordinates of the position in the texture to which the output sampled texture values ​​are to be provided; and

[0152] One or more log2 operations are used on the square roots of the determined elliptic coefficients A, B, C, and F to determine the level of detail of the samples taken at the determined elliptic coefficients A, B, C, and the square roots, wherein the level of detail is sampled at the mass spectrometer (and preferably by determining the level of detail of the samples of the texture as:

[0153] lod=0.5 (2.0 log2 (F_sqrt)+1.0-log2 (A + C + root ))

[0154] in:

[0155] LOD is a defined level of detail;

[0156] F_sqrt is the square root of the elliptic coefficients F; and

[0157] root = sqrt ((AC)^2 + B^2)

[0158] The device also includes:

[0159] The mipmap selection circuit is configured to use the determined level of detail to select one or more mipmap levels of the texture for sampling from the texture to provide output sampled texture values;

[0160] Texture sampling circuitry, configured to sample or sample one or more locations along an anisotropic direction at one or more selected mipmap levels; and

[0161] A sample combination circuit is configured to use the samples or samples taken along the anisotropic direction at one or more mipmap levels to provide output sampled texture values ​​for the sampled locations in the texture.

[0162] Those skilled in the art will understand that these aspects of the invention may and preferably include any one or all of the optional and preferred features of the invention described herein.

[0163] For example, the number of sampling locations along the anisotropic direction in the selected mipmap or mipmap is preferably determined according to the earlier aspects and embodiments of the invention discussed above.

[0164] In these aspects and embodiments of the invention, although the process may produce the selection of only a single mipmap level from the selection of only a single mipmap level based on the level of detail (and this will be discussed further), more typically, the level of detail will be used to identify and select two mipmap levels for the texture of a sample.

[0165] Therefore, in a particularly preferred embodiment, the determined level of detail is used to select (determine) a pair of mipmap levels, including a first more detailed mipmap level and a second more detailed mipmap level, from which samples are taken to provide texture values ​​for the output sample (and the method will include (and the device will be configured to) perform one or more, and preferably multiple, samples along the anisotropic direction), taking samples along the anisotropic direction in the more detailed mipmap level; taking one or more, and preferably multiple, samples along the anisotropic direction in the less detailed mipmap level; and combining the samples or samples taken along the anisotropic direction in the more detailed mipmap level and the samples or samples taken along the anisotropic direction in the less detailed mipmap level to provide texture values ​​for the output sample used).

[0166] In these aspects and implementations, as discussed above, the elliptic coefficients A, B, and C of F, as well as the square root, are preferably determined based on derivatives of the texture coordinates (and preferably, those values ​​are determined once and reused).

[0167] In these and other aspects of the invention, in a preferred embodiment, when the square root of the coefficient F is zero, the level of the detail value is set to "Not a Number" (NaN).

[0168] Correspondingly, the level used to determine the detail value down to the mipmap level of the sample is preferably set to infinity if it is determined to be "Not a Number" (NaN) (whether because the square root of F is zero or otherwise), i.e.:

[0169] lod = isnan(lod) ? inf:lod

[0170] In a particularly preferred embodiment, as described above, the number of locations (anisotropy) can be clamped to a maximum value, and then, with the determined anisotropy clamped, the level of detail in the computation can be modified to trigger (determine) the use of a less detailed mipmap. This helps to avoid aliasing.

[0171] Therefore, in a preferred embodiment, when clamping anisotropy (as discussed above), a more detailed mipmap level is used than that used according to the “standard” detail calculation level (i.e., the level of detail is modified so as to trigger the use of a less detailed mipmap level (more detailed than usually determined)).

[0172] Most preferably, in this case, the level of detail is determined by dividing the major axis radius by the maximum anisotropy (instead of using the minor axis radius). Therefore, in this case, when anisotropy is already factored in, the level of detail determination is preferably as follows:

[0173] if(aniso_degree_was_clamped)lod=0.5 (log2 (A + C + root )–1.0) -log2 (max_aniso)

[0174] The maximum anisotropy is set by max_aniso (as described above).

[0175] When the anisotropy is not clamped to the maximum set anisotropy, the level of detail can be simply determined based on the minor axis radius (as described above), or when the anisotropy is clamped, the level of detail can be determined based on the major axis radius.

[0176] However, in a particularly preferred embodiment, regardless of whether the anisotropy degree is clamped, the level of detail value is determined using an “unclamped” and “clamped” process (preferably as described above), and then one of the determined level of detail value (and preferably the larger of the determined level of detail value) is selected as the level of detail to be used (e.g., and preferably, for determining the mipmap of the sample for the texture).

[0177] In this regard, the applicant has recognized that, particularly when the anisotropy is close to its maximum (clamping) value, the choice of which process to determine the level of detail can lead to different level values ​​determined due to, for example, any relatively limited precision of different levels of detail determination. This can then introduce artifacts (noise), especially when the anisotropy is close to its maximum (clamping) value, because the determined level of detail can then depend in those cases on which level of detail is used (and different levels of detail determination can lead to different levels of detail, even if they should produce the same result).

[0178] Always determining “two” detail values ​​and taking larger values ​​helps ensure consistency in the level of detail used, especially when the anisotropy is close to the maximum permissible value (clamping value), and specifically can reduce or eliminate noise that may occur in the level of detail determination when the anisotropy is close to the maximum (clamping) value.

[0179] Furthermore, at least when using log2 operations to determine the level of detail, performing two levels of detail determination (in practice) remains relatively inexpensive and can therefore be done without any significant adverse impact on the overall operation of the process, and provides better overall results.

[0180] Therefore, in a particularly preferred embodiment, the method includes (and the device accordingly supports and is configured to use two different levels of detail calculation to determine the level of detail for the anisotropy filtering, wherein the anisotropy degree has not yet been clamped to a maximum value), and then using it if the anisotropy degree is clamped to a maximum allowable value, and then selecting one of the two determined detail values, and preferably one of the two determined detail value levels, and preferably one of the levels of the two determined detail values, and preferably the level of the two determined detail values.

[0181] The applicant accordingly believes that determining the level of detail at which the texture is sampled when performing anisotropic filtering (and thus selecting the mipmap level to be used when sampling the texture) can be novel and the invention itself can be novel and inventive, and not only in determining the number of locations of samples in the texture in the manner discussed above.

[0182] Therefore, according to another aspect of the present invention, a method is provided for performing anisotropic filtering during texture sampling to provide output sampled texture values, which are used when presenting output in a graphics processing system, the method comprising:

[0183] When the samples are provided as textures of two or more mipmaps, anisotropic filtering is used to provide the output sampled texture values ​​at positions x and y in the texture:

[0184] The level of detail to be sampled for the texture is determined using the following method:

[0185] The first level of detail is determined using a first level of detail determination process;

[0186] A second, distinct level of detail determination process is used to determine the second level of detail to sample the texture.

[0187] as well as

[0188] Select one of the first determined level of detail and the second determined level of detail as the level of detail to be sampled for the texture;

[0189] The method further includes:

[0190] Use the selected level of detail to select one or more mipmap levels from the mipmap levels of the texture to obtain samples, in order to provide the output sampled texture values;

[0191] In the texture, one or more samples are acquired along anisotropic directions at one or more locations within one or more selected mipmap levels; and

[0192] The one or more samples acquired along the anisotropic direction at the one or more mipmap levels are used to provide output sampled texture values ​​for the sampled location in the texture for use.

[0193] According to another aspect of the present invention, an apparatus is provided for performing anisotropic filtering while sampling a texture to provide output sampled texture values ​​for rendering output in a graphics processing system, the apparatus comprising:

[0194] The level of detail determination circuit is configured to: when anisotropically filtered samples are provided as textures of two or more mipmaps to provide output sampled texture values ​​for positions x, y in the texture:

[0195] The level of detail to be sampled for the texture is determined using the following method:

[0196] The first level of detail is determined using a first level of detail determination process;

[0197] A second, distinct level of detail determination process is used to determine the second level of detail to sample the texture.

[0198] as well as

[0199] Select one of the first determined level of detail and the second determined level of detail as the level of detail to be sampled for the texture;

[0200] The device also includes:

[0201] The mipmap selection circuit is configured to use the selected level of detail to select one or more mipmap levels of the texture for sampling from the texture to provide output sampled texture values;

[0202] A texture sampling circuit, configured to sample or sample one or more locations along an anisotropic direction at one or more selected mipmap levels; and

[0203] A sample combination circuit is configured to use the samples or samples taken along the anisotropic direction at one or more mipmap levels to provide output sampled texture values ​​for the sampled locations in the texture.

[0204] Those skilled in the art will understand that these aspects of the invention may and preferably include any one or all of the optional and preferred features of the invention described herein.

[0205] Therefore, in a particularly preferred embodiment, the two different detail determination process levels used to determine the level of detail include a detail determination process level intended to be used, wherein the anisotropy degree has not yet been clamped to a maximum value, and a detail determination process level intended to be used, wherein the anisotropy degree has been clamped to a maximum allowable value.

[0206] Similarly, selecting one of two such determined detail value levels as the detail level for sampling the texture preferably includes selecting two such determined detail value levels as the larger detail level for sampling the texture.

[0207] In these aspects and particularly preferred embodiments of the invention, the two methods for determining the level of detail are as described above. Therefore, in a particularly preferred embodiment, the level of detail for sampling the texture (and the level of detail to be used when determining the samples for the texture) is determined as follows:

[0208] lod_clamped = 0.5 (log2( A + C + root ) – 1.0) - log2( max_aniso )

[0209] lod_unclamped = 0.5 (2.0 log2(F_sqrt) + 1.0 - log2(A + C + root))

[0210] lod = max (lod_clamped, lod_unclamped)

[0211] Similarly, in a preferred embodiment, when the square root of the coefficient F is zero, the level of the detail value is set to "Not a Number" (NaN). (This would mean that lod_clamped would be used when F_sqrt is zero.)

[0212] Correspondingly, the level used to determine the detail value down to the mipmap level of the sample is preferably set to infinity if it is determined to be "Not a Number" (NaN) (whether because the square root of F is zero or otherwise), i.e.:

[0213] lod = isnan(lod) ? inf:lod

[0214] Similarly, it is preferable to determine the number of sampling locations along the anisotropic direction in the selected mipmap or mipmap according to the earlier aspects and embodiments of the invention discussed above.

[0215] In these aspects and implementations, as discussed above, the elliptic coefficients A, B, and C of F, as well as the square root, are preferably determined based on derivatives of the texture coordinates (and preferably, those values ​​are determined once and reused).

[0216] In these aspects and embodiments of the invention, although the process may produce the selection of only a single mipmap level from the selection of only a single mipmap level based on the level of detail (and this will be discussed further), more typically, the level of detail will be used to identify and select two mipmap levels for the texture of a sample.

[0217] Therefore, in a particularly preferred embodiment, the determined level of detail is used to select (determine) a pair of mipmap levels, including a first more detailed mipmap level and a second more detailed mipmap level, from which samples are taken to provide texture values ​​for the output sample (and the method will include (and the device will be configured to) perform one or more, and preferably multiple, samples along the anisotropic direction), taking samples along the anisotropic direction in the more detailed mipmap level; taking one or more, and preferably multiple, samples along the anisotropic direction in the less detailed mipmap level; and combining the samples or samples taken along the anisotropic direction in the more detailed mipmap level and the samples or samples taken along the anisotropic direction in the less detailed mipmap level to provide texture values ​​for the output sample used).

[0218] In a particularly preferred embodiment, at least when using the log2 operation, when determining the anisotropic filtering parameters (e.g., the level of detail of the texture to be sampled), the process is configured such that (and the processing circuitry or circuitry is configured accordingly such that) zero log2 returns a value minus infinity, i.e.

[0219] log2(0) = -inf.

[0220] This will then ensure, for example, that the derivative of the texture coordinates is zero (i.e., in the case where a set of, for example, four pixels are sampled from the texture at the same location), that the result is a bilinear sample (aniso_degree=1). This will be obtained from the most detailed mipmap level (lod=0) (which will be the preferred result in these cases).

[0221] In these aspects and embodiments of the invention (and in other ways), the level of detail selected based on the mipmap level used can simply be the initial “original” level of detail as discussed above (and in one embodiment, this is the case).

[0222] However, in the preferred embodiment, the level of detail used to select the mipmap level to be used can also, and preferably also, consider other "level of detail" parameters that can be set and used, for example, by applications that require texture mapping operations.

[0223] For example, where it is possible to set a detail “bias” level that will modify the initially determined level of detail, preferably, the detail bias level is considered when selecting the mipmap level, for example, and preferably, when selecting and choosing the mipmap level from the sample, the level of detail modified by the level of detail bias is used.

[0224] Correspondingly, while high and / or low levels of detail “clamps” can be set (in order to cover the highest or lowest level of detail that can be sampled), any such level of detail clamping is again preferably considered when determining the level of detail used to select mipmap levels from samples.

[0225] Similarly, taking into account any “level of detail” parameters, such as the level of detail deviation and the high and low level of detail fixtures discussed above, the level of detail actually used to select the mipmap level to be used also takes into account any (additional) adjustments, and depends on any (further) adjustments to the level of detail determined after applying any level of detail deviation and the high and low level of detail fixtures.

[0226] For example, and preferably, in the case of further adjustments (such as rounding), the level of detail determined after any level of detail deviation, and the levels of high and low detail fixtures have already been applied, is preferably "adjusted" (e.g., rounded) to determine and select the mipmap level to be used.

[0227] Therefore, in a particularly preferred embodiment, the “final” level of detail used to determine which mipmap level from the sample is the level of detail after any adjustments (such as rounding) have been applied, and is preferably determined based on the initially determined original level (preferably determined as described above), any set detail bias and / or fixture level, and any set adjustments (e.g., determined from the original level of detail and any detail bias level and set detail bias and fixture level).

[0228] In a preferred embodiment, the system supports multiple different modes of "mip mapping" operation ("mipmap" modes), which specify the final level of detail to be determined for the mipmap to be sampled (e.g., and preferably from the initially determined original level of detail and any set detail deviations and / or fixture levels). In this case, the "mipmap" mode used is preferably, and preferably set by the application requiring graphics processing, and / or by, for example, the graphics processor driver (e.g., in addition to any specified mipmap mode setting and / or regardless of any application-specified mipmap mode setting).

[0229] In this case, it is preferable to have a "mipmap" mode, which allows for a level of detail used to determine the mipmap to be sampled, and can have a score value.

[0230] Preferably, there is then a second mode in which the level of detail is rounded to an integer value, preferably the closest integer value.

[0231] Of course, other arrangements are possible. For example, other LOD "rounding" patterns can also be used.

[0232] The mipmap used to determine the output sample texture values ​​to be used can be determined from the “final” LOD (i.e., after adjustment (rounding), if any) in any suitable and desired manner.

[0233] For example, when the "final" LOD value is a fractional value, preferably, the final LOD value is used to select the two mipmap levels from and "blended," for example, and preferably using an appropriate interpolation based on the fractional (partial) details. Therefore, in the case of fractional LOD values, the LOD value will be used to determine the two mipmap levels to be blended together, and preferably, how to perform the blending, for example, and preferably, a weighted average of the two mipmap levels in the blending result.

[0234] On the other hand, if the "final" LOD value (i.e., after adjustment (rounding)) is an integer value (which may be, for example, an integer value that mipmap mode specifies to ground the LOD value to, for example, the nearest integer LOD value), then it is preferable to use the (integer) "final" LOD value to determine the individual mipmap level from the sample.

[0235] In these aspects and embodiments of the invention (and other aspects), the number of samples using the selected mipmap level or grade may be determined as needed, but as described above in the particularly preferred embodiments, it is determined according to the first and second aspects of the invention described above.

[0236] Therefore, in this invention, when only a single version of the texture to be sampled (e.g., a single mipmap level) is determined, multiple samples will be collected at one or more locations along the anisotropic direction (in the single mipmap level), preferably based on (equal to) the number of sample locations determined in the manner of the first and second aspects of this invention.

[0237] Correspondingly, when anisotropic filtering (including more detailed and less detailed mipmap levels) is performed from a pair of mipmaps, the samples should, and preferably at one or more locations along the anisotropic direction in each mipmap level, preferably determined in the manner of the first and second aspects of the invention.

[0238] In this context, in one implementation, the same number of locations are obtained along the anisotropic direction at both the more detailed mipmap level and the less detailed mipmap level. In another implementation, samples are taken at fewer locations along the anisotropic direction at the more detailed mipmap level than along the anisotropic direction at the more detailed mipmap level.

[0239] Therefore, in a preferred embodiment, when anisotropic filtering (including more detailed and less detailed mipmap levels) is performed from a pair of mipmaps, samples are acquired along the anisotropic direction at the more detailed mipmap level, and a second smaller number of one or more locations along the anisotropic direction at the more detailed mipmap level (sampling the texture sampled along the anisotropic direction at the more detailed mipmap level, and a second smaller number of sampling locations along the anisotropic direction at the less detailed mipmap level).

[0240] Correspondingly, samples taken at a more detailed mipmap level along the anisotropic direction and samples taken at a less detailed mipmap level along the anisotropic direction are then combined to provide output sampled texture values ​​for use.

[0241] It should be noted here that, as will be discussed further below, a single (e.g., bilinear) sample is taken for each location along the anisotropic direction (and in one embodiment, in another embodiment), but multiple (e.g., bilinear) samples may also be collected for each location along the anisotropic direction. Therefore, unless the context otherwise requires, reference to samples taken or at locations along the anisotropic direction includes taking only a single (e.g., bilinear) sample at the location in question and obtaining multiple (e.g., bilinear) samples at the location in question.

[0242] Therefore, in a preferred embodiment, samples are taken at two or more locations along the anisotropic direction at a more detailed mipmap level, and for one or more locations (but fewer than those sampled along the anisotropic direction at the more detailed mipmap level), samples are taken along the anisotropic direction at a less detailed mipmap level. Thus, it is possible to sample only a single location along the anisotropic direction at the more detailed mipmap level (having multiple locations sampled along the anisotropic direction at the more detailed mipmap level), but in a preferred embodiment, there are still multiple (complex) locations sampled along the anisotropic level at the more detailed mipmap level.

[0243] The relative number of locations sampled in each mipmap level in these embodiments can be chosen as needed (as long as more locations are sampled in the more detailed mipmap level compared to the less detailed mipmap level). In a preferred embodiment, the ratio of the number of locations to samples relative to the number of locations sampled in the less detailed mipmap level is based on and preferably (substantially) equal to the ratio of the resolution of the more detailed mipmap level to the less detailed mipmap level. Therefore, in a preferred embodiment, multiple locations are sampled twice in the more detailed mipmap level compared to the less detailed mipmap level. This may be particularly suitable where the resolutions of the two mipmap levels differ by a factor of two. Of course, other arrangements will be possible.

[0244] In a preferred embodiment, the number of locations for sampling at each mipmap level is determined based on a determined initial "base" anisotropy, where the "base" number represents the number of "bases" at locations sampled from the texture used for the anisotropic filtering process. The number of locations is then set, for example, based on the determined initial, base anisotropy (number of locations), for example, greater than and / or less than an appropriate number of locations, and set in an appropriate manner.

[0245] In this context, the anisotropy of “bases” (number of positions) used to determine the number of positions from each mipmap level in these embodiments is preferably based on the number of positions of the sample as discussed above (i.e., in the manner of the first and second aspects of the invention), and may, for example, simply be the “original” anisotropy (number of positions) determined as described above (and in a preferred embodiment, the “bases” anisotropy based on (from / using) the “original” anisotropy).

[0246] In these implementations, the actual number of sample locations in each mipmap level can be determined from the location of the base anisotropy number in any suitable and desired manner.

[0247] Typically, the number of locations sampled relative to the base number of locations can be increased or decreased in one or both of the more detailed mipmap levels (appropriately) in any suitable and desired manner, as long as there are more locations in the more detailed mipmap level than in the less detailed mipmap level.

[0248] In a preferred embodiment, the increase or decrease of the sampling position in the mipmap level relative to the basic number of positions is based at least in part on the level of detail of the sampled texture, and most preferably, at least in part on the distance from the level of detail intended to be sampled (in terms of its level of detail) according to the mipmap level in question.

[0249] In a preferred embodiment, the level of detail of the sampled texture is derived from the level of detail of a more detailed mipmap, and then the increase in the number of sampling locations at the more detailed mipmap level is greater than the base number of locations (and vice versa). (Therefore, if the level of detail of the texture to be sampled is close to the level of detail of a more detailed mipmap, the number of sampling locations at the more detailed mipmap level is preferably close to the base number of locations.)

[0250] Correspondingly, in a preferred embodiment, the level of detail to be sampled for the texture comes from the level of detail of a less detailed mipmap, and then the number of locations sampled from the less detailed mipmap level of the base location decreases as much (and vice versa). (Therefore, if the level of detail of the texture to be sampled is close to the level of detail of a less detailed mipmap, the number of locations sampled in the less detailed mipmap level is preferably close to the number of bases at the location.)

[0251] Therefore, although in the implementation, the number of sampling locations in each mipmap level can be simply determined based on the "base" anisotropy, which is determined, for example, as discussed above or preferably as described above, the level of detail of the texture sampling operation can also be and preferably considered and used when selecting the number of sample locations in each mipmap level.

[0252] When determining the number of sample locations in each mipmap level, the level of detail used can simply be the initial "raw" level of detail, which is, for example and preferably, determined as described above. However, in a preferred embodiment, the level of detail used for this purpose also takes into account other "level of detail" parameters (as discussed above), and most preferably includes the actual level of detail used to select the mipmap level to use, taking into account any additional "level of detail" parameters that may have been set, and / or, for example, based on the selected mipmap mode (as discussed above), most preferably corresponding to the "final" level of detail (the level of detail used) determined to the mipmap level of the sample in the manner described above (if the level of detail used is after any mipmap mode adjustment).

[0253] Therefore, in a particularly preferred embodiment, the number of sample positions in each mipmap level is determined based on the determined number of “base” positions for the sample (i.e., “base” anisotropy), preferably as described above, and the level of detail at which the texture is sampled (and most preferably, for determining which mipmap level is the final “final” level of detail from the sample).

[0254] In this regard, the applicant further recognizes that, as stated above, the level of detail of the sampled texture (final level of detail) may not correspond to the initial “original” level of detail, which may not correspond to, for example, the initial “original” level based on the projection of the sampled points onto the surface to which the texture is to be applied, but may also be subject to and depend on other parameters, such as the level of detail deviation and / or high and / or low detail “fixtures” and / or any application adjustment (e.g., rounding) based on the “mipmap” mode.

[0255] In a particularly preferred embodiment, a positive “effective level of detail” is determined, i.e., the number of locations sampled at the sampled mipmap level (the number of locations sampled along the anisotropic direction) is reduced when the texture is a more detailed version of the texture for the set “mipmap” mode (preferably after any adjustments (rounding), preferably after applying the projection based on the sampling points) to the initial “original” level of detail on the surface to which the texture is to be applied (and preferably determined from (and only from) the estimated elliptical projection of the sampling points).

[0256] (This assumes that a lower level of detail implies a more detailed mipmap level, and vice versa. Corresponding arrangements can be used where a higher level of detail indicates a more detailed mipmap level.)

[0257] Most preferably, at a positive detail deviation level, the "base" anisotropy (number of positions along the anisotropic direction) is set to fewer positions than the number indicated by the "original" anisotropy (number of positions) determined by the elliptical area of ​​the projection of the output sampling point. The "original" anisotropy is then determined by the elliptical area of ​​the projection of the output sampling point. The number of positions used to sample the texture is reduced and used as the "base" position number, and then the number of positions sampled along the anisotropic direction is selected at more and less detailed mipmap levels.

[0258] The reduction in the number of locations determined in the presence of a positive effective level of detail deviation can be selected as needed and based on any suitable and desired parameters. In a preferred embodiment, the number of locations to be sampled is modified based on the effective level of detail deviation (i.e., the difference between the texture's level of detail and the "original" level of detail determined based on an estimated elliptical footprint, which is the projection of the applied sampling points onto the surface of the sampled surface). (And, for example, the actual number of locations of samples in each of the two mipmap levels can be determined, for example, and preferably one or more of the methods discussed above.)

[0259] As described above, in this invention, samples are collected based on the number of positions determined along the anisotropic direction in the texture being sampled (at the mipmap level or level).

[0260] Therefore, the present invention preferably further includes determining the anisotropic direction of taking samples in the texture (and the device of the present invention accordingly preferably includes anisotropic direction determining circuitry configured to determine the anisotropic direction of samples along the texture) (then taking samples, and then obtaining an appropriate number of positions along the determined anisotropic direction).

[0261] The anisotropic direction of the sampling can be determined in any suitable and desired manner. In a preferred embodiment, this is done by assuming that the sampling points that will use the texture values ​​will be projected as ellipses onto the surface on which the texture is being applied (as discussed above).

[0262] Therefore, preferably, when projected onto the surface on which the texture is being applied, the anisotropic orientation of the sample in the texture is selected and determined based on the estimated elliptical footprint of the sampling points.

[0263] In a preferred embodiment, the anisotropic direction is based on and preferably corresponds to the major axis (direction) of the area of ​​the assumed ellipse occupied by the sampling point onto which the texture value is being applied. Therefore, in a preferred embodiment, the anisotropic direction includes a defined major axis direction corresponding to the ellipse onto which the sampling point is projected onto the surface onto which the texture is being applied. Of course, other arrangements are possible.

[0264] When the anisotropic direction is determined as the direction of the major axis of an ellipse corresponding to the projection of the sampling point on the surface to which the texture is being applied, the direction of the major axis of the ellipse can be determined accordingly in any suitable and desirable manner.

[0265] In a particularly preferred embodiment, a normalized vector (i.e., having a length of "one" (unit vector)) is determined along the major axis of the ellipse and then used to represent and as the anisotropic direction of the sample taken in the texture.

[0266] Then, this vector can be, and preferably is used to offset the coordinates of individual samples truncated along the anisotropy direction, for example, by adding anisotropy_vector between each sample. step_length. (The position of the first sample should be, and preferably appropriately offset from, the texture coordinates given by the application, such that a set of samples is centered on the texture coordinates given by the application.)

[0267] The X and Y components of the unit (normalized) vector in the major axis of the ellipse, corresponding to the projection of the sampling point onto the applied surface, can be determined in any suitable and desired manner.

[0268] For example, the major axis direction can be determined by determining the angle of the direction relative to the coordinate axes in the texture, where the X and Y components of a normal (unit length) vector have the angle, and then the angle is determined (using this vector, and then multiplied by the step size between samples when used to offset the coordinates of sample points).

[0269] In a particularly preferred embodiment, the X and Y components of the unit vector representing the anisotropic (major axis) direction are determined by first determining the X and Y components of a vector of arbitrary (any) length corresponding to the major axis direction of a hypothetical elliptical projection onto the surface onto which the texture is being applied, and then normalizing those components to provide the X and Y components of the unit vector corresponding to the major axis direction of the projected sampling point, as projected onto the surface.

[0270] (The major axis of the elliptical projection corresponding to the sampling point corresponds to the determined X and Y components of the unit vector on the surface to which the texture is applied, and is then preferably used to determine (and as) the anisotropic direction of the sample acquired in the texture.)

[0271] In this regard, the applicant has recognized that the direction of the major axis of the elliptical projection of the sampling point can be determined onto the surface on which the texture is applied in this way, and then, precisely, the need for any angles used to determine said direction is avoided and eliminated (and thus, any triangle calculations are avoided when determining the anisotropic direction). This can then reduce hardware costs when performing anisotropic filtering to determine the anisotropic direction along its sampled texture.

[0272] Accordingly, the applicant believes that when anisotropic filtering is performed in this manner, determining the anisotropic direction along which the texture is sampled may be novel and to the right of the present invention.

[0273] Therefore, according to a fifth aspect of the invention, a method is provided for performing anisotropic filtering when sampling a texture to provide output sampled texture values ​​for use when rendering output in a graphics processing system, the method comprising:

[0274] When using anisotropic filtering to sample texture, output sampled texture values ​​are provided for positions x and y in the texture:

[0275] The anisotropic direction of the samples along the texture is determined by the following method:

[0276] Determine the X and Y components of a vector of arbitrary length from the direction of the major axis of the assumed elliptical projection corresponding to the sampling point to the surface on which the texture is being applied;

[0277] The determined X and Y vector components are normalized to provide the X and Y components of a unit vector corresponding to the direction of the major axis of the area occupied by the ellipse at the sampling point, as if projected onto the surface of the texture onto the surface of the texture; and

[0278] The determined X and Y components of the unit vector to which the texture is applied on the surface of the texture are directed from the direction of the major axis of the elliptical projection corresponding to the sampling point, and the determined X and Y components are applied along the anisotropic direction in the file.

[0279] The method further includes:

[0280] One or more samples are photographed in the texture along the defined anisotropic direction; and

[0281] The sample or sample taken along the anisotropic direction in the texture is used to provide an output sampled texture value for the sampled location in the texture.

[0282] According to a sixth aspect of the invention, an apparatus is provided for performing anisotropic filtering when sampling a texture to provide output sampled texture values ​​for use when rendering output in a graphics processing system, the apparatus comprising:

[0283] An anisotropic direction determination circuit is configured to determine the anisotropic direction along the texture when sampling a texture using anisotropic filtering to provide output sampled texture values ​​at positions x and y in the texture:

[0284] Determine the X and Y components of a vector of arbitrary length from the direction of the major axis of the assumed elliptical projection corresponding to the sampling point to the surface on which the texture is being applied; and

[0285] The determined X and Y vector components are normalized to provide the X and Y components of a unit vector corresponding to the direction of the major axis of the area occupied by the ellipse at the sampling point, as if the texture projected onto the surface is used as the direction of the major axis of the anisotropic direction.

[0286] The device also includes:

[0287] A texture sampling circuit, configured to capture samples or samples in a texture along a defined anisotropic direction; and

[0288] A sample combination circuit is configured to use samples or samples taken along the anisotropic direction of the texture to provide output sampled texture values ​​for the locations sampled in the texture.

[0289] Those skilled in the art will understand that these aspects of the invention may and preferably include any one or all of the optional and preferred features of the invention described herein.

[0290] Therefore, for example, according to the earlier aspects of the invention discussed above, it is preferable to determine the number of sampling locations along the anisotropic direction. Accordingly, it is preferable to determine the level of detail, and thus the mipmap level or grade, for sampling the texture, according to the earlier aspects and embodiments of the invention discussed above.

[0291] In a particularly preferred embodiment, the elliptic coefficients A, B, and C are used (and preferably only used) to determine the X and Y components of a vector (of arbitrary length) corresponding to the direction of the major axis of the elliptical projection at the sampling location onto the surface to which the texture is being applied. In a particularly preferred embodiment, only the elliptic coefficient B (and preferably as B or -B) is used to determine one of the components, and all coefficients A, B, and C (and preferably as AC roots or AC roots (where the root is the parameter "root" as determined above) are used to determine the other components).

[0292] In this case, the X and Y vector components are preferably determined based on whether the elliptic coefficient A is greater than the elliptic coefficient C (i.e., using the elliptic coefficient B to determine the X or Y component), and more preferably based on whether the elliptic coefficient A is greater than the elliptic coefficient C.

[0293] Most preferably, the X and Y components of a vector of arbitrary length representing the anisotropic direction are determined by the elliptic coefficients A, B, and C (and determined according to whether the value of the elliptic coefficient A is greater than the value of the elliptic coefficient C) as follows:

[0294] if(A > C)

[0295] {

[0296] aniso_vec.x = -B

[0297] aniso_vec.y = A - C + root

[0298] }

[0299] if (A < C)

[0300] {

[0301] aniso_vec.x = A - C - root

[0302] aniso_vec.y = B

[0303] }

[0304] in:

[0305] aniso_vec.x and aniso_vec.y are the X and Y components of a vector of arbitrary length, respectively, which correspond to the direction from the major axis of the elliptical projection of the sampling position to the surface on which the texture is being applied;

[0306] A, B, and C are ellipticity coefficients, preferably determined as described above; and

[0307] The root is the parameter "root" as defined above (i.e., root = sqrt((AC)^2 B^2)).

[0308] When A=C, the X and Y components of arbitrary length in the anisotropic direction can be determined from the elliptic coefficients A, B, and C according to the method shown above for A > C, or the method shown above for A. C, that is, such that:

[0309] if (A > C)

[0310] {

[0311] aniso_vec.x = -B

[0312] aniso_vec.y = A - C + root

[0313] }

[0314] else

[0315] {

[0316] aniso_vec.x = A - C - root

[0317] aniso_vec.y = B

[0318] }

[0319] or

[0320] if (A >= C)

[0321] {

[0322] aniso_vec.x = -B

[0323] aniso_vec.y = A - C + root

[0324] }

[0325] else

[0326] {

[0327] aniso_vec.x = A - C - root

[0328] aniso_vec.y = B

[0329] In a preferred embodiment, the X and Y components of the vector representing the anisotropic direction, of arbitrary length, are determined in the same way from the elliptic coefficients A, B, and C, except when A is greater than or equal to C (i.e., when A is less than C, in a different way).

[0330] if (A >= C)

[0331] {

[0332] aniso_vec.x = -B

[0333] aniso_vec.y = A - C + root

[0334] }

[0335] else

[0336] {

[0337] aniso_vec.x = A - C - root

[0338] aniso_vec.y = B

[0339] }

[0340] Then, the determined X and Y components for an anisotropic direction vector of arbitrary length should be, and preferably are used to determine the X and Y components of a unit-length vector (normalized vector) in the anisotropic direction. This can be done in any suitable and desirable manner.

[0341] In a preferred embodiment, this is done by determining the length of the arbitrary length vector from the determined X and Y components of the determined major axis direction vector and then dividing the determined X and Y components by the determined length of the vector to project onto the surface on which the texture is being applied in the direction of the major axis of the ellipse, thereby providing the corresponding X and Y components of the unit (normalized) vector to segment the determined X and Y components.

[0342] In this case, the length of the major axis vector is preferably determined as the square root of the sum of the squares of the X and Y components of the vector (i.e., using Pythagoras' theorem). Most preferably, the reciprocal of the length of the major axis direction vector is determined, and then each of the X and Y components of the vector is multiplied by the reciprocal (the reciprocal of the vector's length) to determine the X and Y components of the unit (normalized) vector along the major axis direction (this will thus indicate and be used as the anisotropic direction when sampling is used for anisotropic filtering).

[0343] Therefore, in a preferred embodiment, the X and Y components corresponding to the unit vector in the anisotropic direction are determined based on the X and Y components determined with respect to the arbitrary length vector corresponding to the major axis of the ellipse, as follows:

[0344] inv_len = 1.0 / sqrt( aniso_vec.x^2 + aniso_vec.y^2 )

[0345] aniso_vec.X = aniso_vec.x inv_len

[0346] aniso_vec.Y = aniso_vec.y inv_len

[0347] in:

[0348] aniso_vec.x and aniso_vec.y are the X and Y components of a vector of arbitrary length from the direction of the major axis of the elliptical projection corresponding to the sampling position to the surface on which the texture is being applied, preferably determined as described above;

[0349] inv_len is the reciprocal of the length of the vector;

[0350] and

[0351] aniso_vec.X and aniso_vec.Y are the X and Y components of a normalized vector (a vector of unit length), which correspond to the direction from the major axis of the elliptical projection of the sampling location to the surface on which the texture is being applied.

[0352] Once the number of positions of the sample along the anisotropic direction is determined, the mipmap level or the average direction of the sample is determined, and the anisotropic direction of the sample will be adopted, then the number of positions of the sample should be determined to be, and preferably, truncated along the anisotropic direction in the texture of the mipmap level or level in question.

[0353] The desired number of sampling locations can be arranged along the anisotropic direction at the mipmap level in any suitable and desired manner. In a particularly preferred embodiment, they are equidistantly spaced along the anisotropic direction and preferably located on a defined anisotropic direction (i.e., on a defined major axis corresponding to the area of ​​the elliptical portion of the texture to which the sampling points will be applied). Most preferably, the defined number of sampling locations are positioned on the defined major axis with the elliptical projection of the sampling points onto the surface to which the texture is to be applied, and equidistantly spaced along a defined length of the major axis. The samples are preferably centered on the center of the ellipse (therefore, if two samples are taken, they are preferably placed equidistantly on either side of the center of the ellipse along the major axis).

[0354] The mipmap level should be, and preferably, sampled at each location where samples are to be taken. In one implementation, a single sample is taken for each location along the anisotropic direction to be sampled. In this case, it is preferable to acquire a single sample at said location.

[0355] In another implementation, multiple samples are taken at each location along the anisotropic direction to be sampled (and preferably the same number of samples are taken at each location). In this case, the multiple samples are preferably merged to provide the resulting sampled values ​​for the location in question. The multiple samples are preferably appropriately arranged around the location where the samples were taken, for example, and preferably in a suitable “hypersampling” pattern around the location.

[0356] Most preferably, in the case of the final level of detail of the texture sampling sample, the texture is a more detailed form of texture than the initial, "original" level of detail, and a more detailed version of the detail determined by the elliptical projection of the sampling points on the surface to which the texture is applied, i.e., where the "effective level of detail deviation" (as described above) is negative (less than 0). (Again, assuming that a smaller detail value indicates a more detailed mipmap level), preferably by increasing the number of samples taken in at least one (and preferably both) of the mipmap level or in the sampled mipmap level by taking more samples (by "more than") per location in the anisotropic direction of the sample taking.

[0357] The number of samples determined and acquired can be increased as needed, where there is a negative effective level of detail, and based on any suitable and desired parameters. In a preferred embodiment, this is based on the effective level of detail (i.e., the difference between the level of detail at which the texture is sampled and the “original” level of detail determined based on the estimated elliptical footprint, which is the projection of the sampling point onto the surface of the texture to be applied).

[0358] In a preferred embodiment, the determined effective level of detail deviation is used to select one or more, preferably two, and preferably all of the following: the number of samples to take pictures of each location along the anisotropic direction to be sampled; the spacing of those samples (e.g., around the locations along the anisotropic direction); and the weighting of those samples (their relative contribution to the "exceeding" output value).

[0359] Each sample taken at a location along the anisotropic direction can be a single point sample from the texture (e.g., corresponding to the value of the nearest texel).

[0360] However, in a preferred embodiment, each sample taken for a location at the mipmap level includes a bilinear filtered sample (e.g., and preferably according to the bilinear filtering process of the graphics processing system in question). In this case, one (or more) cross-shaped filtered samples will be taken for each location at each mipmap level along the anisotropic direction.

[0361] The samples themselves can be obtained from the texture (and the determined sampled values) in any suitable and desired manner. This is preferably done by sampling the texture in other ways in the graphics processor and the graphics processing system in question (e.g., when performing anisotropic filtering or otherwise).

[0362] (This invention primarily relates to selecting the number of sampling locations in each mipmap level, determining one or more mipmap levels to be sampled, and / or determining the anisotropic direction towards the sample. Therefore, there is no limitation on the actual samples obtained at the locations, or any existing process or procedure for sampling textures in graphics processors and graphics processing systems can be used, and is preferably used, for sampling at the desired number of locations in each mipmap level.)

[0363] As will be understood from the above, in a preferred embodiment of the invention, at least in a preferred embodiment, operation in the manner of the invention can determine that sampling should be performed for non-integer locations in one or both of the two mipmap levels. In this case, the number of sampled locations can simply be rounded to an integer value, for example, and preferably, the nearest integer (or the nearest highest integer or the nearest lowest integer). Alternatively, where the graphics processor and graphics processing system support taking fractional samples from the texture, the operation can be used to sample for desired non-integer locations in or within the mipmap level.

[0364] Once samples have been taken at the mipmap level or level, those samples are used to provide output sample texture values ​​for use by the graphics processor (e.g., when generating the rendering output in question).

[0365] Samples (combined) at or within a mipmap level can be used to provide output sampled texture values ​​for use by the graphics processor (e.g., when generating the rendering output in question in any suitable and desired manner). In a preferred embodiment, samples taken along anisotropic directions at a given mipmap level are preferably (appropriately) combined within and for the mipmap level in question to give combined sampled values ​​for the mipmap level in question. Thus, samples for a more detailed mipmap level will be appropriately combined to provide combined sampled values ​​for said more detailed mipmap level, and correspondingly, samples for a less detailed mipmap level will be appropriately combined to give (individual) combined sampled values ​​for the less detailed mipmap level.

[0366] For each of the two mipmap levels, the determined (individual) combined sampled values ​​(if present) are preferably then merged according to the (score) level of the detail value and the distance from the mipmap level in question (the distance from the mipmap level in question to the mipmap level where it is expected to be sampled at the texture), for example, and preferably using linear interpolation based on a fraction of any (the) LOD value to provide the final, output sampled texture value.

[0367] Samples taken along the anisotropic direction at the mipmap level can be combined to provide combined sampled values ​​for the mipmap level in any suitable and desired manner. They are preferably combined based on the distance of the sample (location) from the center of the major axis of the projected ellipse along the anisotropic direction. Preferably, the samples are combined in a suitably weighted manner based on these factors, and most preferably, a suitable weighted average of the samples is determined.

[0368] When sampling an integer number of locations at the mipmap level, as described above, those samples are preferably equidistant from the center of the ellipse along the anisotropic direction, and are preferably combined based on the distance of the samples (locations) from the center of the major axis of the projected ellipse along the anisotropic direction (e.g., and preferably by weighting the contribution of the samples (locations) to the combined result based on the distance of the samples (locations) from the center of the ellipse).

[0369] In the case of a sample number of samples, and then in the case of a sample number between 1 and 2, when the sample number increases from 1 to 2, it is preferable to take two samples with a preferred gradually increasing interval between them (until they are exactly one texture when exactly two samples are taken). For a sample number greater than 2, it is then preferable to add another (e.g., two) new samples on either side of the existing two samples (and outside of said two samples), since the number of samples exceeds two (and preferably, spaced one texel), but the interpolation weight is more than twice the actual number of samples to be taken (e.g., and preferably, such that the interpolation weight of the additional samples will actually start at a sample count of 2), and gradually increases as the number of samples to be taken increases (e.g., for a sample count of 0.25). (Correspondingly, in a preferred embodiment, as the sample count increases to more than 2, the interpolation weight of the initial (inner) two samples can be gradually reduced to allow the contribution (weighing) of the additional samples in 2 to increase as the number of samples to be taken increases (this will help to provide a smoother transition since the sample count is greater than 2).)

[0370] Once the output sampled texture values ​​have been determined, appropriate elements for the graphics processor and graphics processing pipeline (e.g., for fragment shaders) can and preferably be provided.

[0371] The output sampled texture values ​​can be used in any suitable and desired manner, and should preferably be used in accordance with normal texture mapping operations and texture usage in graphics processors and graphics processing systems. (As mentioned above, the present invention essentially relates to determining how the output sampled texture values ​​are. The output values ​​can then be used as needed, and in the normal manner of such texture values.)

[0372] The output sampled texture values ​​should be used accordingly based on and according to the data represented by the texture. Therefore, in the case where the texture represents color values ​​(e.g., an image), the output sampled texture values ​​can be appropriately used when the graphics processor renders the sampled points in the rendered output (e.g., an image, such as a displayed image). Similarly, where the texture represents other data values, such as light or shadow values, depth values, etc., the output sampled texture values ​​will then be appropriately used, for example, to determine and / or set the lighting or shadow effects at the sampled locations in question. Of course, other arrangements will be possible.

[0373] In a particularly preferred embodiment, the invention is implemented at the texture mapping level (texture mapping / texture mapping circuitry) of the graphics processor of a graphics processing system. Therefore, in a preferred embodiment, the graphics processor includes a texture mapper (texture mapping circuitry), and the texture mapper of the graphics processor is operable to determine the various anisotropic filtering parameters discussed above, and to set and select the number of locations where textures should be sampled, at the level of detail of the sampled textures, etc., as described above.

[0374] Therefore, the invention extends to, and preferably includes, a texture mapping circuit for a graphics processor, the texture mapping circuit comprising any aspect of the invention.

[0375] In addition to the specific circuitry required to perform the operation in the manner of the present invention, the texture mapper (texture mapping circuit) may further include any suitable and desired circuitry, units, and stages for performing the texture mapping operation and performing the desired texture mapping operation in any suitable and desired manner.

[0376] Therefore, it may, and preferably includes, one or more of the following: a texture filtering circuit for performing texture filtering operations (and may at least perform anisotropic filtering in the manner of the invention, but preferably also supports other filtering operations, such as bilinear and trilinear filtering); a texture data acquisition circuit operable to acquire data values ​​of texture data elements for texture filtering operations (e.g., and preferably, via a suitable texture cache); a coordinate calculation circuit (stage); a level (stage) of detail calculation circuitry; a texture selection circuit (stage); and an output result providing circuit (stage).

[0377] Operating in the manner of the invention can be triggered in any suitable and desired way. In a preferred embodiment, it is performed in response to an appropriate texture mapping request (for textures to be anisotropically sampled), for example and preferably to the texture mapping stage (texture mapping circuitry). Such requests can be triggered as needed, for example and preferably by the renderer (e.g., fragment shader) of the graphics processor and graphics pipeline, for example, in response to and when the texture mapping operation needs to be performed, triggering the rendering of the graphics processor and graphics pipeline.

[0378] Anisotropic filtering operations in the manner of the present invention can be automatically triggered, for example, whenever anisotropic filtering texture mapping operations are required. Alternatively or additionally, operations in the manner of the present invention can be controlled by an application that requires graphics processing (e.g., by exposing it to an API), so that the application (application programmer) can subsequently specify when anisotropic filtering should be performed in the manner of the present invention.

[0379] Of course, other arrangements are possible.

[0380] Although the invention has been described above with reference to a single texture mapping and texture filtering operation (e.g., for a given sampling position in the rendered output), in practice, when generating the rendered output, the texture mapping operation will be repeated for multiple times, such that the output sampling position spans, for example, the entire original region being rendered. Therefore, the invention is preferably performed with respect to multiple texture mapping operations, for example, and preferably for each of the multiple sampling positions in the generated rendered output.

[0381] The operation in the manner of the present invention can be used for any suitable and desired form of texturing operation and graphics (or other) processing operation, which can be performed using textures, for example, and preferably when generating frames (images) for display, but also when generating other, such as non-graphical output.

[0382] The texture mapping apparatus of the present invention may include any one or more of the processing stages, circuitry, and components typically included in a graphics processing pipeline (processor). Thus, for example, a graphics processor may include raw setup circuitry, a quasi-grating (circuit), and / or a renderer (circuit). Alternatively or concurrently, the graphics processor may be capable of performing ray tracing and / or hybrid ray tracing.

[0383] In a preferred embodiment, the graphics processor includes a renderer operable to perform graphics rendering operations, and a texture mapper operable to perform graphics texturing operations in response to a request for graphics texturing operations from the renderer. The renderer is preferably in the form of a programmable fragment shader or includes a programmable fragment shader (which processes graphics fragments for sampling locations of the rendering output generated by the graphics processor by executing a fragment shader program using a corresponding execution thread).

[0384] The graphics processing unit (processing pipeline) may also include any other suitable and desired processing stages that the graphics processing pipeline may include, such as a depth (or depth and stencil) tester, a mixer, a tile buffer, a write unit, etc.

[0385] If needed, texture mappers and texture mapping devices can also be coprocessors of the CPU, for example (i.e., coupled to the CPU that executes the rendering pipeline).

[0386] The graphics processor and / or texture mapping device of the present invention can be, and typically will be, part of an overall graphics and / or data processing system. Therefore, the invention also extends to data or graphics processing systems having the graphics processor and / or texture mapping device as described herein.

[0387] A data or graphics processing system may include a memory or storage system (memory system) for storing data, etc., as mentioned herein, which may be external to the graphics processor and texture mapping device. The memory or storage system may be operable to store, and may store, a set of texture icons used in texturing operations.

[0388] Therefore, as will be understood, embodiments of the present invention can be implemented in a data / graphics processing system including memory and a graphics processing unit (GPU) (graphics processor), the GPU including texture mapping devices as described herein. In embodiments, the data / graphics processing system may further include a host processor that executes applications that may require data or graphics processing by the GPU and instructs the GPU accordingly (e.g., via a driver for the GPU). The system may further include suitable storage devices (e.g., memory), caches, etc.

[0389] In one embodiment, the data or graphics processing system and / or (e.g., graphics) processor further includes one or more memory and / or memory devices storing the data described herein and / or storing software for performing the processes described herein, and / or communicating with said one or more memory and / or memory devices. The data / graphics processing system and / or graphics processor and / or texture mapping device may also communicate with a host microprocessor and / or have a display showing images based on the generated data.

[0390] In one implementation, the various functions of the technology described herein are performed on a single graphics processing platform that generates and outputs data (such as rendered fragment data written to the frame buffer) for example, for a display device.

[0391] This invention can be implemented in any suitable system, such as a microprocessor-based system with a suitable configuration. In one embodiment, the techniques described herein are implemented in a computer and / or microprocessor-based system.

[0392] The various functions of the present invention can be performed in any desired and suitable manner. For example, the functions of the present invention can be implemented in hardware or software when needed. Thus, for example, the various functional elements and stages of the present invention may include suitable processors, controllers, functional units, circuits, processing logic, microprocessor arrangements, etc., capable of operating to perform various functions, such as suitable dedicated hardware elements (processing circuits) and / or programmable hardware elements (processing circuits) that can be programmed to operate in a desired manner.

[0393] It should also be noted here that, as those skilled in the art will understand, the various functions of the present invention can be repeated and / or performed in parallel on a given processor. Similarly, various processing stages can share processing circuitry / circuits, etc., if desired.

[0394] Furthermore, any one or more processing levels of the present invention may be embodied, for example, in the form of one or more fixed functional units (hardware) (processing circuits) and / or in the form of programmable processing circuits that can be programmed to perform desired operations. Similarly, any one or more processing levels and processing level circuits of the present invention may be provided as separate circuit elements to other processing levels or any one or more processing levels and processing level circuits, and / or any one or more processing levels and processing level circuits may be formed at least partially by shared processing circuits.

[0395] Those skilled in the art will also understand that all described embodiments of the present invention may, where appropriate, include any one or all of the features described herein.

[0396] The method according to the invention can be implemented at least in part using software, such as a computer program. Therefore, further embodiments of the technology described herein include: computer software particularly adapted to perform the methods described herein when mounted on a data processor; a computer program element including computer software code portions for performing the methods described herein when the program element is run on a data processor; and a computer program including code adapted to perform all steps of one or more methods described herein when the program is run on a data processing system. The data processing system may be a microprocessor, a programmable FPGA (Field-Programmable Gate Array), etc.

[0397] The invention also extends to computer software carriers that include software that, when used to operate a graphics processor, renderer, or other system including a data processor, causes the steps of the methods of the invention to be performed in conjunction with said graphics processor, renderer, or system. Such computer software carriers can be physical storage media, such as ROM chips, CD-ROMs, RAM, flash memory, or disks, or they can be signals, such as electronic signals, optical signals, or radio signals, such as signals to satellites, etc.

[0398] It will also be understood that not all steps of the method of the present invention need to be performed by computer software, and therefore, according to a broader aspect, the present invention provides computer software mounted on a computer software carrier for performing at least one step of the method described herein, and such software.

[0399] This invention can therefore be suitably embodied as a computer program product for use with a computer system. Such embodiments may include a series of computer-readable instructions fixed on a tangible, non-transitory medium, such as a computer-readable medium, for example, a disk, CD-ROM, ROM, RAM, flash memory, or hard disk. It may also include a series of computer-readable instructions that can be invisibly transmitted to a computer system via a modem or other interface device, through a tangible medium (including but not limited to optical or analog communication lines), or using wireless technologies (including but not limited to microwave, infrared, or other transmission technologies). This series of computer-readable instructions embodies all or part of the functions described above.

[0400] Those skilled in the art will understand that such computer-readable instructions can be written in a variety of programming languages ​​to be used with many computer architectures or operating systems. Furthermore, such instructions can be stored using any current or future memory technology (including, but not limited to, semiconductor, magnetic, or optical technologies), or transmitted using any current or future communication technology (including, but not limited to, optical, infrared, or microwave technologies). It is conceivable that such computer program products can be distributed as removable media with accompanying printed or electronic documentation (e.g., shrink-wrapping software), pre-loaded with a computer system on, for example, a system ROM or a fixed disk, or distributed via a network (e.g., the Internet or the World Wide Web) from a server or electronic bulletin board.

[0401] Implementations of the technology described herein will now be described by way of example only, with reference to the accompanying drawings, wherein:

[0402] Figure 1 The principle of anisotropic filtering when sampling files is illustrated;

[0403] Figure 2 An example of sampling two mipmap levels for texture anisotropy is shown;

[0404] Figure 3 An exemplary graphics processing system in which the present invention can be implemented is shown;

[0405] Figure 4 A graphics processor including a texture mapper is schematically shown;

[0406] Figure 5 An exemplary graphics texture mapper is shown in more detail;

[0407] Figure 6 This is a flowchart illustrating anisotropic filtering in an embodiment of the present invention;

[0408] Figure 7 This is a flowchart illustrating the determination of anisotropic filtering parameters in an embodiment of the present invention;

[0409] Figure 8 The generation of texture coordinate derivatives in an embodiment of the present invention is illustrated; and

[0410] Figure 9 and Figure 10 The determination of the anisotropy direction in the implementation scheme is shown.

[0411] Similar reference numerals are used for similar features in the accompanying drawings (where appropriate).

[0412] Several embodiments of the present invention will now be described in the context of graphics processing systems.

[0413] Figure 3 An exemplary graphics processing system 1 in which the present invention and this embodiment can be implemented is shown.

[0414] Figure 1 The exemplary graphics processing system shown includes a host processor that includes a central processing unit (CPU) 1, a graphics processing unit (GPU) 100, a video codec 51, a display controller 55, and a memory controller 58. Figure 3 As shown, these units communicate via interconnect 59 and have access to off-chip memory 20. In this system, GPU 100, video codec 51, and / or CPU 57 generate frames (images) to be displayed, and display controller 55 then provides the frames to display 54 for display.

[0415] In the use of this system, an application 60 (such as a game) executing on the host processor (CPU) 57 will, for example, need to display frames on the monitor 54. To do this, the application will submit appropriate commands and data to the driver 61 for the graphics processor 100 executing on the CPU 57. The driver 61 will then generate appropriate commands and data to cause the graphics processor 100 to render appropriate frames for display and store those frames in appropriate frame buffers, such as in main memory 20. The display controller 55 will then read those frames into the buffer for the monitor, where they are then read out and displayed on the display panel of the monitor 54.

[0416] Figure 4 It shows that it can be used Figure 3 An exemplary graphics processor (graphics processing unit (GPU)) 100 used in a data processing system is capable of performing texture mapping.

[0417] like Figure 4 As shown, GPU 100 includes data processing circuitry that implements a graphics processing pipeline. The pipeline includes, in particular, an ester exchanger 102 in the form of a programmable (fragment) shader core 104 and a renderer. The pipeline uses a buffer 106 (e.g., in external memory 108) to store an output array (e.g., frames or images to be displayed).

[0418] GPU 100 further includes a texture mapper 110, and memory 108 will also store, in particular, the graphics textures used by GPU 100 when performing texture mapping operations.

[0419] In this system, rasterizer 102 esterifies the input primitives into individual graphic fragments for processing. To do this, rasterizer 102 esterifies the primitives to sampled locations representing the rendered output and generates graphic fragments representing the appropriate sampled locations for the rendered primitives. Each fragment can represent a single sampled location or a set of multiple sampled locations. The fragments generated by rasterizer 102 are then sent to fragment shader (renderer) 104 for use in shading.

[0420] Fragment shader 104 executes the shader program for the fragments emitted by the chromatograph to render (shaded) the fragments. The fragments are processed using execution threads in the shader core, where threads execute the shader program for processing the fragments. Threads are executed for each sampling location to be shaded.

[0421] The shader program may include texturing instructions for texture mapping operations that require execution by the texture mapper 110.

[0422] When the fragment shader 104 encounters a texturing instruction, it sends the texturing instruction from the fragment shader 104 to the texture mapper 110, requesting the texture mapper 110 to perform the texturing operation.

[0423] When requested by fragment shader 104 to perform a texture mapping operation, texture mapper 110 reads a texture from memory 108 (if needed), performs the texture mapping operation, and returns (e.g., RGB color) values ​​from the texture to fragment shader 104 for use when occluding the fragment in question and the sampling location.

[0424] Then, the “shaded” fragment sampling positions from fragment shader 104 are stored as part of the output in buffer 106, such as in memory 108, for example, for subsequent post-processing or display.

[0425] Figure 5 An exemplary texture mapper (texture mapping device) 110 is shown in more detail.

[0426] like Figure 5 As shown, the texture mapper 110 includes multiple processing stages (circuits), including an input request stage (circuit) 200, which accepts texture mapping operation requests from the renderer (e.g., Figure 4 (Fragment shader 104 in the image). This is followed by a coordinate calculation stage (circuit) 201, which, for example, will convert any coordinates included in the texture mapping operation request into appropriate typical coordinates used between 0.0 and 1.0 when sampling the texture.

[0427] Then, the Level of Detail (LOD) calculation stage (circuit) 202 can determine the level of detail to be sampled for the texture mapping operation (this selects the mipmap level to use and how to filter between them if the texture is in mipmap form). For example, if the fragment shader program itself can explicitly indicate the level of detail to use, this level of detail calculation may not be needed, or the texture may not be stored in mipmap form.

[0428] Then, the texel selection stage (circuit) 203 uses the coordinates determined by the coordinate calculation stage 201 to determine the actual texture (texture data element) in the texture (and, if appropriate, the mipmap level determined in the texture) for the texture mapping operation.

[0429] The required texture (its data) is then obtained through the cache lookup stage (circuit) 204.

[0430] like Figure 5 As shown, although the texture data will be stored in the memory 108 system, when the texture mapper 110 needs texture data, the texture data required for the textured operation will be retrieved from the memory 108, where the textured data is stored. The textured data storage device is first loaded into the texture cache 205 of the texture mapper 110, whereby the texture mapper 110 then reads the texture data from the texel cache 205 via the cache lookup circuit 204.

[0431] like Figure 5 As shown, texture mapper 110 may accordingly include a texture loader (texture el loading circuit) 206, operable to load texture data from textures stored in memory 108 for storage in texture cache 205. A decompressor (decoder) stage (circuit) 207 may also be present, which may decompress (decode) the texture in compressed (encoded) format stored in memory 108 system before storing the texture element values ​​in texture element cache 205.

[0432] Once the required texture (texture data values) has been obtained from the texture cache 205, they are used in the desired texture filtering operation through the texture filtering stage (circuit) 208 to generate appropriate output for the sampled texture location (coordinates). The output is then appropriately packaged and returned to the fragment shader through the output stage (circuit) 209. The texture filtering circuit 208 can, for example, use the obtained texture values ​​to perform any desired form of filtering, such as bilinear, trilinear, anisotropic, or any other form of filtering, to generate the desired filtered sample results.

[0433] This embodiment particularly relates to the case where the texture mapper 110 performs anisotropic filtering to sample the texture. In this case, such as Figure 2 As shown, samples can be obtained in each of the two mipmap levels (including more detailed and less detailed mipmap levels) for the location along the defined anisotropic direction.

[0434] Figure 6 The operation of texture mapper 110 in this embodiment is shown.

[0435] like Figure 6 As shown, when anisotropic filtering is to be performed (step 70), the texture mapper first determines appropriate parameters for the elliptical footprint, which actually corresponds to the projection of the sampling point onto the surface on which the texture is being applied (step 71). The manner in which this is accomplished in the embodiments of the invention will be described in more detail below.

[0436] Then, using the determined elliptical footprint (parameters of the ellipse), the level of detail (LOD) for sampling the texture, the anisotropic direction of the texture to be sampled, and the "anisotropy degree," which represents the number of locations where samples are taken along the anisotropic direction in the texture (step 72). Again, the manner in which this is accomplished in the embodiments of the invention will be described in more detail below.

[0437] Once the level of detail, anisotropy direction, and anisotropy degree of the sample texture are determined, a mipmap of the sample is selected for the texture (step 73).

[0438] The mipmap of the sampled texture is selected based on the level of detail of the sampled texture, and in the case of a detail score level, a mipmap level corresponding to a more detailed level than the determined level of detail (i.e., including a higher resolution version of the texture) will be selected, and another mipmap level will include a less detailed (lower resolution) version of the texture than the determined level of detail.

[0439] In this embodiment, while the mipmap level used to determine which mipmap level for a sample can be the “final” level of detail determined from the determined ellipse parameters, it is preferable, in the case that any adjustments (such as rounding, bias, clamping, etc.) have been applied, to be the level of detail determined from the initially determined “original” level determined from the ellipse parameters, and any detail bias and / or clamping level to be applied, and any adjustments to be applied (e.g., determined from the original level of detail and any level bias bias and clamping level).

[0440] Then determine how many locations should be sampled in each mipmap (step 74).

[0441] The number of sampling locations in each mipmap level can be simply determined as (equal to) the anisotropy determined by the elliptic parameters, or it can be based on the determined anisotropy, but with some potential modifications. For example, the number of sampling locations in each mipmap level can be determined based on the determined number of “base” locations of the sample (i.e., the “base” anisotropy) from the elliptic parameters and the level of detail of the texture being sampled.

[0442] The same number of locations along the anisotropic direction can be taken in all sampled mipmap levels, or, if needed, a different number of samples can be taken in each mipmap level, such as taking fewer locations along the anisotropic direction in a more detailed mipmap level.

[0443] Once the number of positions along the anisotropic direction has been taken for each mipmap level, a sample of a certain number of positions is obtained in the selected mipmap (step 75).

[0444] like Figure 2 As shown, in this embodiment, the sampling locations are spaced apart by one texture along the anisotropic direction in the texture (along the length of the major axis of the area occupied by the projected ellipse). In this embodiment, a single bilinear sample is taken at each location along the anisotropic direction to be sampled. (However, if desired, multiple (e.g., bilinear) samples (e.g., "supersamples" at each location to be sampled) can be acquired for each location along the anisotropic direction.)

[0445] It should be understood that in this implementation, it can be determined whether samples should be taken for non-integer positions at the mipmap level or within the level. In this case, the number of sampled positions can simply be rounded to the nearest integer (or the nearest highest integer, or the nearest lowest integer, as needed).

[0446] However, where the texture mapper supports taking fractional samples from the texture, this operation is preferably used to sample at desired non-integer locations within the mipmap level or grade in question.

[0447] Once samples have been taken from the selected mipmap level, those samples are used (combined) to provide output sampled texture values ​​for use by the graphics processor (step 76).

[0448] In this implementation, for each individual mipmap level, the samples collected in the mipmap level are appropriately combined based on the sample count (number of locations to be sampled) determined in the mipmap level in question to provide a combined sample value for the mipmap level in question.

[0449] Therefore, for each mipmap level, a weighted average of the generated samples is calculated (based on the distance of the sample (location) from the center of the major axis of the projected ellipse along the anisotropic direction).

[0450] Then, the resulting values ​​for each mipmap level are linearly interpolated based on the fractional LOD value (i.e., based on the distance of the mipmap level in question from the actual level of detail that is expected to be sampled at the quality control) to provide the texture values ​​of the final, overall output sample.

[0451] Typically, the weighting of samples based on their distance from the center of the projected ellipse can follow, for example, a linear function of the distance to the ellipse center, or more complex features (weight distributions) can be used, such as a Gaussian function or a certain approximation of a Gaussian function. Similar arrangements can be used for interpolation between mipmap levels.

[0452] Of course, other arrangements are possible.

[0453] Once the output sampled texture value has been determined, it is returned to the fragment shader to be used (step 77).

[0454] As discussed above, this embodiment uses the estimated elliptical projection of the sampling points (pixels) to which the texture will be applied to determine the texture being applied to the surface. Specifically, it determines how many samples are taken from the texture and from which these samples should be taken.

[0455] In embodiments of this invention, this is based on and according to the techniques described below: Paul S. Heckbert, Fundamentals of texting, Mapping and Image Warping (Masters), Report No. UCB / CSD 89 / 516, Computer Science Division, University of California, Berkeley, June 1989, the entire contents of which are incorporated herein by reference.

[0456] Therefore, in this embodiment, the parametric circle in a coordinate system is:

[0457] p = (x, y) = (cos t, sin t)

[0458] This represents a circular pixel on the "screen," where x and y represent the horizontal and vertical axes of the "screen," respectively. Then, suppose a linear transformation (matrix) M is used to transform this circle p into another coordinate system (the coordinate system of texture, u, v), such that:

[0459]

[0460] This linear transformation converts the circle in the first coordinate system into an ellipse in the second coordinate system. The ellipse is centered at the source (0,0) and passes through the points (ux, vx) and (uy, vy) (and these points correspond to the parameter vauest with a 90-degree phase difference).

[0461] This means that in the first coordinate system (the screen), the point (ux, vx) can be viewed as the texture coordinates of the adjacent pixel to the right, and (uy, vy) can be viewed as the texture coordinates of the adjacent pixel below the "current" pixel on the screen, assuming the "current" pixel has texture coordinates (0,0) at (0,0). (In other words, (ux, vx) are the partial derivatives of the texture coordinates on the screen, and (uy, vy) are the partial derivatives of the texture coordinates in the Y direction.)

[0462] Then, the linear transformation matrix M is estimated by calculating (ux, vx) = Tx - T0 (where Tx is the texture coordinate of the adjacent pixel in the x direction and T0 is the texture coordinate of the current pixel), and (uy, vy) = Ty - T0.

[0463] Based on the linear transformation matrix M, the implicit elliptic coefficients A, B, C, D, E, and F can be found. (The implicit equation of conic (where elliptic is a class) is:)

[0464] Ax^2+Bxy+Cy^2+Dx+Ey-F=0. )

[0465] In this case, assuming the projected ellipse will be centered at the origin, the coefficients D and E will both be equal to zero, thus giving a typical cone shape:

[0466] Ax^2 Bxy Cy^2=F

[0467]

[0468] Q is an implicit matrix of quadratic form and is defined as follows:

[0469]

[0470] Therefore, the coefficients of implicit elliptic functions can be determined as follows:

[0471] A = vx^2 + vy^2

[0472] B = -2 (ux vx + uy vy)

[0473] C = ux^2 + uy^2

[0474] F = (ux vy - uy vx)^2

[0475] Since these fundamental vectors of the ellipse (ux, vx) and (uy, vy) are not necessarily perpendicular to each other (and in fact, many different fundamental vectors describe the same ellipse), a set of fundamental vectors corresponding to the minor and major axes of the (projected) ellipse can be determined (and the lengths of the minor and major axes of the ellipse will be the lengths of those vectors).

[0476] By using orthogonal basis vectors to determine a new linear transformation matrix M, the fundamental vectors corresponding to the minor and major axes of the ellipse are found from the implicit elliptic coefficients a, B, C, and F. This matrix can be written in the following form:

[0477]

[0478] As mentioned above:

[0479]

[0480] Therefore, in this case, Q can be found to be:

[0481]

[0482] The following Λ is diagonal, and R is orthogonal. Λ and R are then used to extract Q from the cone matrix (known from the preceding calculations). For this purpose, the diagonal form of Q is determined:

[0483]

[0484] Where A is a diagonal matrix Q and column S are the corresponding eigenvectors. The eigenvectors are chosen to have unit length so that R = S and Λ -2 = A can be equal.

[0485] The eigenvalues ​​of a 2 × 2 symmetric matrix Q are:

[0486]

[0487] This means that matrix M can be found to be:

[0488]

[0489] in:

[0490] p=AC

[0491] q=A+C

[0492] t=sgn (p) sqrt (p^2+B^2)

[0493] This matrix M assumes F=1, but as mentioned above, F in the surface is: F= (ux vy-uy vx)^2.

[0494] Therefore, the matrix M is multiplied together with F to find the orthogonal basis vectors for the actual correct scaling of the ellipse:

[0495] ux' = F sqrt( (t + p) / (t (q + t)) )

[0496] vx' = F sgn(B p) sqrt( (t - p) / (t (q + t)) )

[0497] uy' = -F sgn(B p) sqrt( (t - p) / (t (q - t)) )

[0498] vy' = F sqrt( (t + p) / (t (q - t)) )

[0499] This can be viewed as an orthogonal set of derived vectors.

[0500] From this, we can see that the length of the carrier is:

[0501] lx = sqrt(ux'^2 + vx'^2) = F sqrt( ((t + p) / (t (q + t))) + ((t - p) / (t (q + t))) ) = F sqrt(2 / (q + t))

[0502] ly = sqrt(uy'^2 + vy'^2) = F sqrt( ((t - p) / (t (q - t))) + ((t + p) / (t (q - t))) ) = F sqrt(2 / (q - t))

[0503] Anisotropy is:

[0504] aniso_degree = major_axis_radius / minor_axis_radius

[0505] To determine this, we need to determine which lx and ly are the major and minor axes. It is known that q must be positive and t can be positive or negative. If t is positive, then q must be the major axis, and lx must be the minor axis. If t is negative, then lx must be both the major and minor axis. Therefore, we can define:

[0506] T = abs( t ) = sqrt( p^2 + B^2 )

[0507] major_axis_radius = F sqrt( 2 / (q - T) )

[0508] minor_axis_radius = F sqrt( 2 / (q + T) )

[0509] Then the anisotropy degree can be determined as:

[0510] anisotropy_degree = sqrt( (q + T) / (q - T) )

[0511] And the level of detail (LOD) can be determined as follows:

[0512] LOD = log2( minor_axis_radius ) = log2( F sqrt( 2 / (q + T) ) ) = log2( F ) + 0.5 - 0.5 log2( q + T )

[0513] Now refer to Figure 7 , Figure 8 , Figure 9 and Figure 10The method for determining the degree of anisotropy, the direction of anisotropy, and the level of detail based on the principles of the above-described techniques in this embodiment is described in more detail.

[0514] Figure 7 This embodiment illustrates the process performed by texture mapper 110 to determine anisotropic filtering parameters, namely level of detail, degree of anisotropy, and anisotropic direction (basically corresponding to about Figure 6 (Steps 71 and 72 of the texturing mapper operation).

[0515] Figure 8 , Figure 9 and Figure 10 To explain in more detail Figure 7 Some aspects of the operation shown.

[0516] When a texturing request for anisotropically filtered texture samples reaches the texture mapper, Figure 7 The process begins (step 80). This essentially corresponds to... Figure 6 Step 70 in the process.

[0517] Then there is a sequence of steps 81-83 where the parameters are determined, the elliptical footprint corresponding to the projection of the location to be sampled onto the surface to which the texture is to be applied. These steps essentially correspond to... Figure 6 Step 71 in the process.

[0518] like Figure 7 As shown, the determination of the elliptical footprint area begins by determining derivatives dTdx and dTdy of the texture coordinates in the X and Y directions of the screen space (rendered output), respectively (step 81). The derivatives are given in texel coordinate space such that they indicate the number of textures (and therefore can be fractional values) between the texture coordinates (in the rendered output) of the current sampling position on the screen and the texture coordinates of the next sampling position on the screen in the X and Y directions, respectively.

[0519] In this implementation, the texture coordinate derivatives in the x and Y directions of screen space (render target space) are determined by grouping the sampling positions into 2×2 sampling position “quanta”. The x derivative is then determined as the coordinate difference between the texture coordinates (x direction) of the top two positions above the 2×2 quadrupole, and the Y derivative is determined as the coordinate difference (Y direction) between the texture coordinates of the two left-hand positions in the 2×2 quadrupole.

[0520] Figure 8 This is shown, along with the x-derivative 100 and y-derivative 101 of the quadrupole at the 2×2 sampling position.

[0521] Then, the determined texture coordinate derivatives are used to determine the coefficients A, B, and C of the implicit function Ax^2 + Bxy + Cy^2 = F, as well as the square root of the coefficient F, which defines the elliptical footprint of the sampling position on the surface to which the texture will be applied (step 82).

[0522] In this implementation, the elliptic coefficients A and C are determined from the texture coordinate derivatives as follows:

[0523] A = dTdx.y^2 + dTdy.y^2

[0524] C = dTdx.x^2 + dTdy.x^2

[0525] The elliptic coefficient B is determined accordingly by the derivative of the texture coordinates, as follows:

[0526] B = -2 (dTdx.x dTdx.y + dTdy.x dTdy.y

[0527] Then, the square root (sqrt(F)) of the elliptic coefficient F is determined based on the derivative of the texture coordinates as follows:

[0528] F_sqrt = abs (dTdx.y dTdy.x - dTdx.x dTdy.y)

[0529] Then, using the coefficients A, B, and C thus determined, the appropriate ellipse shape parameters p, q, and t are determined (step 83), as follows:

[0530] p=AC;

[0531] q = A + C;

[0532] t = sqrt(p p + B B);

[0533] These steps thus determine the elliptical footprint of the sampling points projected onto the surface to which the texture is to be applied.

[0534] Then, the anisotropy (the number of locations used to sample the texture), the anisotropy direction (the direction along which the vector takes samples in the texture), and the level of detail of the sample texture (thus determining which mipmapp from the texture to the sample) are used.

[0535] Figure 7Steps 84-89 illustrate how this can be accomplished in this embodiment. These steps correspond to... Figure 6 Step 72 in the process.

[0536] like Figure 7 As shown, the first step is to determine the anisotropy degree and the anisotropy vector (anisotropy direction) (step 84).

[0537] An anisotropic vector is a vector that describes the direction of the major axis of an ellipse, which is the surface onto which the sampling points are projected to apply the texture.

[0538] In this implementation, the anisotropic vector (direction) is determined based on the following elliptic coefficients (x and y components, amin_vect.x and amin_vect.y, for unit vectors in the anisotropic direction):

[0539] if (A > C)

[0540] {

[0541] aniso_vec.x = -B

[0542] aniso_vec.y = A - C + root

[0543] }

[0544] else

[0545] {

[0546] aniso_vec.x = A - C - root

[0547] aniso_vec.y = B

[0548] }

[0549] inv_len = 1.0 / sqrt( aniso_vec.x^2 + aniso_vec.y^2 )

[0550] aniso_vec.x = aniso_vec.x inv_len

[0551] aniso_vec.y = aniso_vec.y inv_len

[0552] in:

[0553] root = sqrt((A - C)^2 + B^2)

[0554] This can be done in hardware, especially considering that the final asin_vec does not need to have very high precision.

[0555] Figure 9 and Figure 10 This shows how the anisotropic direction can be determined in more detail in this way.

[0556] For an ellipse of the form Ax^2 + Bxy + Cy^2 = F, if A ≤ C, then the angle θ of the major axis of the ellipse is given by the following:

[0557] θ = arctan(B / (AC)) / 2

[0558] Correspondingly, if A > C, then the above θ is actually the angle of the minor axis, so it should be rotated 90 degrees (pi / 2 radians) to make it the angle of the principal axis:

[0559] If (A > C) θ = θ + (pi / 2);

[0560] Then, the anisotropic direction is a vector with that angle:

[0561] vec2 aniso_vect;

[0562] aniso_vec.x = cos(θ);

[0563] aniso_vec.y = sin(θ);

[0564] However, this calculation involves an arctan, a cosine, and a sinine. These are very expensive calculations to implement in hardware.

[0565] Figure 9 It shows an angle θ The vector V of 2 can be determined in a relatively simple way from the elliptic coefficients a, B, and C:

[0566] V = vec2 (AC, B).

[0567] However, anisotropic directions require vectors with an angle θ.

[0568] Figure 10 This shows that a vector M in the direction of the major axis (θ) can be generated by adding a level vector H (angle 0) (and thus giving the correct anisotropic direction). The level vector has the same length as vector V (i.e., sqrt((AC)x(AC)+BxB)) and an X-component with the same sign as the X-component of vector V:

[0569] H=vec2( sqrt( (A - C) (A - C) + B B, 0),

[0570] To the vector V.

[0571] therefore:

[0572] M=V+H

[0573] It lies in the direction of the major axis (θ) (and thus gives the correct direction of anisotropy).

[0574] Then the vector M can be normalized to a length of 1 to obtain the desired anisotropic vector (direction), i.e.:

[0575] / / Determine the direction of the anisotropic vector

[0576] p=AC;

[0577] t = sqrt( p p + B B);

[0578] if ( p >= 0 )

[0579] {

[0580] aniso_vec.x = -B;

[0581] aniso_vec.y = p + t;

[0582] }

[0583] else

[0584] {

[0585] aniso_vec.x = p - t;

[0586] aniso_vec.y = B;

[0587] }

[0588] / / Normalize the vector length to 1.0

[0589] Float length = sqrt(aniso_vec.x) aniso_vec.x + aniso_vec.y aniso_vec.y);

[0590] aniso_vec = aniso_vec / length;

[0591] (The determination of p and t is also used to determine the degree of anisotropy, so hardware can be shared.)

[0592] (As can be seen from the following, adding the vector of angle 0 to angle θ) A vector of 2 (where both vectors have the same length) has the effect of providing a vector with an angle θ:

[0593] let Let θ be a vector, and let θ represent θ as a vector. and

[0594]

[0595] along with and Similarly, this magnitude does not affect the angle (because it simply limits scaling, it does not affect the shape), and then if the magnitude is assumed to be 1, and the angle θ is θ0 = 0, the added vector can then be defined as:

[0596]

[0597] From the formula for half-angle of the tangent:

[0598]

[0599] It can be seen that:

[0600] .)

[0602] In an embodiment of the present invention, the anisotropy degree of the number of locations to be sampled is determined from the elliptic coefficients A, B, and C and the square root of the elliptic coefficient F (sqrt(F)), as follows:

[0603] root = sqrt ((AC)^2 + B^2)

[0604] aniso_degree=( A + C + root ) / (2.0 F_sqrt)

[0605] It should be noted here that this determination of the degree of anisotropy uses the square root (F_sqrt) of the coefficient F. This simplifies the deterministic implementation in hardware. Another advantage of this determination is that it uses only the coefficient F (F_sqrt) and the square root of the numerically stable term A+C+root. This is numerically stable because a, C, and the root are all non-negative, and therefore there is no difference between two large values ​​that produce a small value. (This should be compared to the formula containing qT discussed above, where numerical instability can exist when q and T are close in value (and subsequently small due to the difference).) The greater numerical stability provided by this implementation requires less hardware precision.

[0606] In this implementation, if the determined anisotropy degree is not a number (nan), it is set to 1, thus effectively disabling anisotropic filtering, i.e.:

[0607] if (isnan(aniso_degree)) aniso_degree = 1

[0608] Once the anisotropy degree is determined, it is then, if necessary, constrained to the maximum permissible anisotropy degree (step 85). That is:

[0609] if ( aniso_degree > max_aniso ) aniso_degree = max_aniso

[0610] Using the maximum permissible anisotropy in this way allows for a reduction in the computational cost of capping anisotropic filtering. The maximum permissible anisotropy can be set, for example, by an application requiring graphics processing.

[0611] Furthermore, if the determined sample size (determined anisotropy) is less than 1, the determined anisotropy is set to 1, i.e.:

[0612] if (aniso_degree is <1.0) aniso_degree = 1.0.

[0613] Then, the final stage of the method is to determine the level of detail at which the texture is sampled.

[0614] like Figure 7 As shown, two different processes are used to determine the level of detail, where it is assumed that the anisotropy is clamped to the maximum permissible anisotropy at step 85, and it is assumed that the anisotropy is not clamped to the maximum permissible anisotropy at step 85.

[0615] Specifically, if anisotropy is not clamped (step 86), then the level of detail is determined:

[0616] lod_unclamped = 0.5 (2.0) log2( F_sqrt ) + 1.0 - log2( A + C + root ));

[0617] And if anisotropy is taken into account (step 87), then the level of detail is determined:

[0618] lod_clamped = 0.5 ( log2( A + C + root ) - 1.0 ) - log2( max_aniso );

[0619] Then, the higher of the two different levels of detail is taken as the level of detail used (step 88):

[0620] lod = max( lod_clamped, lod_unclamped )

[0621] Therefore, in this implementation scheme, the level of detail is determined as follows:

[0622] lod_clamped) = 0.5 (log2( A + C + root ) – 1.0) - log2( max_aniso )

[0623] lod unclamped = 0.5 (2.0 log2( F_sqrt ) +1.0 - log2( A + C + root))

[0624] lod = max (lod_clamped, lod_unclamped)

[0625] In this implementation, when F_sqrt is zero, lod_unclamped is set to a non-numeric value (not a number), so that lod_clamped will be used in this case.

[0626] Additionally, if the LOD ends in nanometers, then set it to infinity:

[0627] lod=isnan(lod)? inf: lod;

[0628] This method for determining the level of detail is inexpensive in hardware because the level of detail is not very high precision and the basis-2 logarithm can be calculated.

[0629] Once the level of detail, anisotropy degree, and anisotropy direction have been determined (step 89), the texture can be sampled accordingly based on those samples (as discussed above). Figure 6 Step 73 in the middle.

[0630] The following is used for execution Figure 7 The example pseudocode for the process shown is shown below.

[0631] /

[0632] Anisotropy degree, vector and LOD calculation.

[0633]

[0634] @param Input: dTdx X-axis texel coordinate derivative.

[0635] @param Input: dTdy, Y-axis texel coordinate derivative.

[0636] @param Input max_aniso Maximum anisotropy_degree.

[0637] @param Output LOD This will receive the calculated LOD.

[0638] @param outputs aniso_degree, which will receive the calculated anisotropy degree.

[0639] @param outputs aniso_vec, which will receive the calculated anisotropy vector.

[0640] /

[0641] void aniso_lod_ calculations (in vec2 dTdx, in vec2 dTdy, in int max_aniso, out float lod, out float aniso_degree, out vec2 aniso_vec)

[0642] {

[0643] / / Elliptic Transformation

[0644] Unless otherwise stated, all calculations are performed with 16-bit mantissa precision.

[0645] / / Calculate level and vertical coefficient

[0646] float A = dTdx.y dTdx.y + dTdy.y dTdy.y;

[0647] float C = dTdx.x dTdx.x + dTdy.x dTdy.x;

[0648] / / Calculate the rotation coefficient

[0649] float B = -2.0 ( dTdx.x dTdx.y + dTdy.x dTdy.y );

[0650] / / Calculate the proportionality coefficient (directly calculate the square root, as it requires this).

[0651] / / F = (dTdx.y dTdy.x - dTdx.x dTdy.y)^2

[0652] float F_sqrt = abs( dTdx.y dTdy.x - dTdx.x dTdy.y ); / / This calculation requires high precision (20 mantissas).

[0653] / / We now have equation A x x + B x y + C y The ellipse described by y = F.

[0654] / / Calculate some parameters describing the shape of the ellipse

[0655] float p = A - C;

[0656] float q = A + C;

[0657] float t = sqrt( p p + B B);

[0658] / / Calculate anisotropy

[0659] float dividend = q + t;

[0660] aniso_degree = dividend / (2.0 F_sqrt);

[0661] / / If asin_degine is nan, replace it to disable anisotropic filtering.

[0662] if ( isnan( aniso_degree ) ) aniso_degree = 1;

[0663] / / Fixture anisotropy

[0664] aniso_degree = min( aniso_degree, float( max_aniso ) );

[0665] / / Retrieve at least one sample

[0666] if ( aniso_degree < 1.0 ) aniso_degree = 1.0;

[0667] / / Calculate LOD

[0668] float lod_clamped = 0.5 ( log2( dividend ) - 1.0 ) - log2( max_aniso);

[0669] float lod_unclamped = 0.5 (2.0) log2( F_sqrt ) + 1.0 - log2( dividend) );

[0670] lod = max( lod_clamped, lod_unclamped ); / / Note: lod_unclamped ==nan in case F_sqrt is zero. In that case lod_clamped will be used.

[0671] / / Set LOD to infinity if it ends in nan.

[0672] / / Because infinite derivatives will result in LOD being Nan

[0673] lod = isnan( lod ) ? inf : lod;

[0674] / / Calculate the direction of the anisotropic vector

[0675] if ( p >= 0 )

[0676] {

[0677] aniso_vec.x = -B;

[0678] aniso_vec.y = p + t;

[0679] }

[0680] else

[0681] {

[0682] aniso_vec.x = p - t;

[0683] aniso_vec.y = B;

[0684] }

[0685] / / Length of the normalized aniso vector

[0686] / / invsqrt( x ) = 1.0 / sqrt( x )

[0687] float inv_aniso_vec_len = invsqrt( aniso_vec.x aniso_vec.x + aniso_vec.y aniso_vec.y);

[0688] aniso_vec = inv_aniso_vec_len;

[0689] }

[0690] Of course, other arrangements are possible.

[0691] As will be understood from the above, the present invention, in its preferred embodiments, can at least provide an improved technique for anisotropic filtering, which can, for example, reduce the processing burden when performing anisotropic filtering.

Claims

1. A method for performing anisotropic filtering while sampling a texture to provide output sampled texture values ​​used when rendering output in a graphics processing system, the method comprising: When using anisotropic filtering to sample textures to provide output sampled texture values ​​for positions x and y in the texture: The number of locations to sample the texture along the anisotropic direction is determined by the following method, wherein samples are acquired in the texture along the anisotropic direction: Determine if it has the form Ax 2 +Bxy+Cy 2 =F is the square root of the elliptic coefficient F, where the ellipse corresponds to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, and x and y are the coordinates of the position in the texture, for which the output sampled texture value will be provided; as well as The square root of the determined elliptic coefficient F is used to determine the number of locations in the texture where samples should be acquired along the anisotropic direction. The method further includes: Based on the determined number of locations, one or more samples are acquired in the texture along the anisotropic direction; as well as The one or more samples acquired along the anisotropic direction in the texture are used to provide an output sampled texture value for the sampled location in the texture, for use.

2. The method according to claim 1, wherein the square root of the elliptic coefficient F is determined based on the derivatives dTdx and dTdy of the texture coordinates as follows: F_sqrt = abs (dTdx.y dTdy.x - dTdx.x dTdy.y) Where x and y are the positions in the texture where the sampled texture values ​​need to be output.

3. The method of claim 1, wherein the square root of the elliptic coefficient F is used as a scaling factor when determining the number of locations in the texture to be acquired along the anisotropic direction.

4. The method of claim 1, further comprising determining the elliptic coefficients A, B, and C, and using the determined elliptic coefficients A, B, and C and the square root of the elliptic coefficient F to determine the number of locations to be sampled as follows: root = sqrt((A - C)^2 + B^2) vision_degrees = ( A + C + root ) / ( 2.0 F_sqrt) Where A, B, C, and F are the elliptic coefficients of the ellipse, and the ellipse is the projection of the screen space sampling position onto the surface on which the texture is to be applied; aniso_degree is the number of locations to be sampled in the determined texture, and F_sqrt is the square root of the elliptic coefficient F.

5. The method of claim 1, further comprising determining the level of detail (LOD) of the texture to be sampled as follows: lod = 0.5 (2.0 log2(F_sqrt) + 1.0 - log2(A + C + root)) in: lod is the level of detail that is determined; root = sqrt((A - C)^2 + B^2); A, B, and C are the elliptic coefficients; and F_sqrt is the square root of the elliptic coefficient F.

6. A method for performing anisotropic filtering while sampling a texture to provide output sampled texture values ​​used when rendering output in a graphics processing system, the method comprising: When anisotropic filtering is used to sample textures provided as two or more mipmaps to provide output sampled texture values ​​for positions x and y in the texture: The level of detail to be sampled for the texture is determined using the following method: Determine if it has the form Ax 2 +Bxy+Cy 2 =F is the square root of the coefficients F of the ellipse, the ellipse corresponding to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, where x and y are the coordinates of the position in the texture, and the output sampled texture value for that position will be provided; and The level of detail to be sampled for the texture is determined by using the square root of the determined elliptic coefficient F with a log2 operation. The method further includes: Use the determined level of detail to select one or more mipmap levels from the mipmap levels of the texture to obtain samples, in order to provide the output sampled texture values; In the texture, one or more samples are acquired along anisotropic directions at one or more locations within one or more selected mipmap levels; and The one or more samples acquired along the anisotropic direction at the one or more mipmap levels are used to provide output sampled texture values ​​for the sampled location in the texture for use.

7. The method of claim 6, further comprising determining the level of detail (LOD) of the texture to be sampled by: The first level of detail is determined using a first level of detail determination process; A second, distinct level of detail determination process is used to determine the second level of detail to sample the texture. as well as Choose either the determined first level of detail or the determined second level of detail as the level of detail to be sampled for the texture.

8. A method for performing anisotropic filtering while sampling a texture to provide output sampled texture values ​​used when rendering output in a graphics processing system, the method comprising: When anisotropic filtering is used to sample textures provided as two or more mipmaps to provide output sampled texture values ​​for positions x and y in the texture: The level of detail to be sampled for the texture is determined using the following method: The first level of detail is determined using a first level of detail determination process; A second, distinct level of detail determination process is used to determine the second level of detail to sample the texture. as well as Select one of the determined first level of detail and the determined second level of detail as the level of detail to be sampled for the texture; The method further includes: The selected level of detail is used to select one or more mipmap levels of the texture from which samples are obtained to provide the output sampled texture values; In the texture, one or more samples are acquired along anisotropic directions at one or more locations within one or more selected mipmap levels; and The one or more samples acquired along the anisotropic direction at the one or more mipmap levels are used to provide output sampled texture values ​​for the sampled location in the texture for use.

9. The method according to claim 8, wherein the method comprises: The number of locations to sample the texture along the anisotropic direction is determined by the following method, wherein samples are acquired in the texture along the anisotropic direction: Determine if it has the form Ax 2 +Bxy+Cy 2 =F is the square root of the elliptic coefficient F, where the ellipse corresponds to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, and x and y are the coordinates of the position in the texture, for which the output sampled texture value will be provided; as well as The square root of the determined elliptic coefficient F is used to determine the number of locations in the texture where samples should be acquired along the anisotropic direction. The method further includes determining the level of detail to be sampled for the texture as follows: lod_clamped = 0.5 (log2(A + C + root) – 1.0) - log2(max_aniso) lod_unclamped = 0.5 (2.0 log2(F_sqrt) + 1.0 - log2(A + C + root)) lod = max (lod_clamped, lod_unclamped) in: lod is the level of detail that is determined; root = sqrt((A - C)^2 + B^2); A, B, and C are the elliptic coefficients; F_sqrt is the square root of the elliptic coefficient F; and max_aniso is the maximum number of allowed locations to sample the texture.

10. The method of claim 8, further comprising: The anisotropic direction to be along in the texture to obtain the sample is determined by the following method: Determine the X and Y components of an arbitrary length vector, the arbitrary length vector corresponding to the direction of the major axis of the assumed elliptical projection from the sampling point onto the surface to which the texture is applied; The determined X vector components and the determined Y vector components are normalized to provide the X and Y components of a unit vector, the unit vector corresponding to the direction of the major axis of the area occupied by the ellipse on the surface to which the sampling point is projected. as well as The determined X and Y components of the unit vector are used as the anisotropic direction to be followed in the texture to acquire samples, the unit vector corresponding to the direction of the major axis of the elliptical projection of the sampling point onto the surface on which the texture is applied.

11. An apparatus for performing anisotropic filtering while sampling a texture to provide output sampled texture values ​​used when rendering output in a graphics processing system, the apparatus comprising: The circuit for determining the number of sampling locations is configured to: when using anisotropic filtering to sample a texture to provide output sampled texture values ​​for positions x and y in the texture: The number of locations to sample the texture along the anisotropic direction is determined by the following method, wherein samples are acquired in the texture along the anisotropic direction: Determine if it has the form Ax 2 +Bxy+Cy 2 =F is the square root of the elliptic coefficient F, where the ellipse corresponds to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, and x and y are the coordinates of the position in the texture, for which the output sampled texture value will be provided; as well as The square root of the determined elliptic coefficient F is used to determine the number of locations in the texture where samples should be acquired along the anisotropic direction. The device also includes: A texture sampling circuit configured to acquire one or more samples in the texture along the anisotropic direction based on a determined number of positions; and A sample combination circuit configured to use one or more samples acquired along the anisotropic direction in the texture to provide output sampled texture values ​​for a sampled location in the texture for use.

12. The device of claim 11, wherein the square root of the elliptic coefficient F is determined based on the derivatives dTdx and dTdy of the texture coordinates as follows: F_sqrt = abs (dTdx.y dTdy.x - dTdx.x dTdy.y) Where x and y are the positions in the texture where the sampled texture values ​​need to be output.

13. The device of claim 11, wherein the square root of the elliptic coefficient F is used as a scaling factor when determining the number of locations in the texture to be acquired along the anisotropic direction.

14. The apparatus of claim 11, wherein the circuitry for determining the number of locations to be sampled is configured to determine the number of locations of the texture to be sampled along an anisotropic direction in which samples will be acquired: The elliptic coefficients A, B, and C are also determined; and The number of locations to be sampled is determined using the determined elliptic coefficients A, B, and C, and the square root of the elliptic coefficient F, as follows: root = sqrt((A - C)^2 + B^2) vision_degrees = ( A + C + root ) / ( 2.0 F_sqrt) Where A, B, C, and F are the elliptic coefficients of the ellipse, and the ellipse is the projection of the screen-space sampling position onto the surface to which the texture is to be applied; and aniso_degree is the number of locations to be sampled in the determined texture, and F_sqrt is the square root of the elliptic coefficient F.

15. The apparatus of claim 11, further comprising: The level of detail (LOD) determination circuit is configured to determine the LOD of the texture to be sampled as follows: lod = 0.5 (2.0 log2(F_sqrt) + 1.0 - log2(A + C + root)) in: lod is the level of detail that is determined; root = sqrt((A - C)^2 + B^2); A, B, and C are the elliptic coefficients; and F_sqrt is the square root of the elliptic coefficient F.

16. An apparatus for performing anisotropic filtering while sampling a texture to provide output sampled texture values ​​used when rendering output in a graphics processing system, the apparatus comprising: The level of detail determination circuit is configured to: when anisotropically filtered samples are provided as textures of two or more mipmaps to provide output sampled texture values ​​for positions x, y in the texture: The level of detail to be sampled for the texture is determined using the following method: Determine if it has the form Ax 2 +Bxy+Cy 2 =F, the square root of the elliptic coefficient F, where the ellipse corresponds to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, and x and y are the coordinates of the position in the texture, for which the output sampled texture value will be provided; and The level of detail to be sampled for the texture is determined by using the square root of the determined elliptic coefficient F with a log2 operation. The device also includes: The mipmap selection circuit is configured to select one or more mipmap levels from the mipmap levels of the texture using a determined level of detail to provide an output sampled texture value. A texture sampling circuit, configured to acquire one or more samples in the texture at one or more locations along anisotropic directions at one or more selected mipmap levels; and A sample combination circuit is configured to use one or more samples acquired along the anisotropic direction at one or more mipmap levels to provide output sampled texture values ​​for a sampled location in the texture for use.

17. The apparatus of claim 16, further comprising: A level of detail (LOD) determination circuit is configured to determine the LOD of the texture to be sampled in the following manner: The first level of detail is determined using a first level of detail determination process; A second, distinct level of detail determination process is used to determine the second level of detail to sample the texture. as well as Choose either the determined first level of detail or the determined second level of detail as the level of detail to be sampled for the texture.

18. An apparatus for performing anisotropic filtering while sampling a texture to provide output sampled texture values ​​used when rendering output in a graphics processing system, the apparatus comprising: The level of detail determination circuit is configured to: when anisotropically filtered samples are provided as textures of two or more mipmaps to provide output sampled texture values ​​for positions x, y in the texture: The level of detail to be sampled for the texture is determined using the following method: The first level of detail is determined using a first level of detail determination process; A second, distinct level of detail determination process is used to determine the second level of detail to sample the texture. as well as Select one of the determined first level of detail and the determined second level of detail as the level of detail to be sampled for the texture; The device also includes: The mipmap selection circuit is configured to use a selected level of detail to select one or more mipmap levels from the mipmap levels of the texture to obtain samples, in order to provide output sampled texture values. A texture sampling circuit, configured to acquire one or more samples in the texture at one or more locations along anisotropic directions at one or more selected mipmap levels; and A sample combination circuit is configured to use one or more samples acquired along the anisotropic direction at one or more mipmap levels to provide output sampled texture values ​​for a sampled location in the texture for use.

19. The device according to claim 18, wherein, The device further includes a sampling location number determination circuit, the sampling location number determination circuit being configured to determine the number of locations along the anisotropic direction to sample the texture, wherein samples are acquired in the texture along the anisotropic direction: Determine if it has the form Ax 2 +Bxy+Cy 2 =F is the square root of the elliptic coefficient F, where the ellipse corresponds to the projection of the sampled points of the texture onto the surface to which the texture is to be applied, and x and y are the coordinates of the position in the texture, for which the output sampled texture value will be provided; as well as The square root of the determined elliptic coefficient F is used to determine the number of locations in the texture where samples should be acquired along the anisotropic direction. The level of detail (LOD) determination circuit is configured to determine the LOD of the texture to be sampled as follows: lod_clamped = 0.5 (log2(A + C + root) – 1.0) - log2(max_aniso) lod_unclamped = 0.5 (2.0 log2(F_sqrt) + 1.0 - log2(A + C + root)) lod = max (lod_clamped, lod_unclamped) in: lod is the level of detail that is determined; root = sqrt((A - C)^2 + B^2); A, B, and C are the elliptic coefficients; F_sqrt is the square root of the elliptic coefficients F; and max_aniso is the maximum number of allowed locations to sample the texture.

20. The apparatus of claim 18, further comprising: An anisotropic orientation determination circuit is configured to determine the anisotropic orientation in the texture to be used to acquire samples by: Determine the X and Y components of an arbitrary length vector, the arbitrary length vector corresponding to the direction of the major axis of the assumed elliptical projection from the sampling point onto the surface to which the texture is applied; The determined X vector components and the determined Y vector components are normalized to provide the X and Y components of a unit vector, the unit vector corresponding to the direction of the major axis of the area occupied by the ellipse on the surface to which the sampling point is projected. as well as The determined X and Y components of the unit vector are used as the anisotropic direction to be followed in the texture to acquire samples, the unit vector corresponding to the direction of the major axis of the elliptical projection of the sampling point onto the surface on which the texture is applied.

21. A computer storage medium comprising computer software code that, when run on one or more data processors, performs the method according to any one of claims 1, 6, or 8.