IP Library Granted Patent US 11,645,807
Granted Patent B2
US 11,645,807 · App. 17/647,137 · Granted May 9, 2023

Graphics texture mapping

Inventors: Edvard Fielding (Trondheim, NO); Dominic Hugo Symes (Cambridge, GB)
Assignee: Arm Limited
G06T15/04G06T7/44G06T2210/36
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,645,807
App. No.
17/647,137
Granted
May 9, 2023
Kind
B2
Abstract

When performing anisotropic filtering when sampling a texture to provide an output sampled texture value for use when rendering an output in a graphics processing system, a number of positions for which to sample the texture along an anisotropy direction along which samples will be taken in the texture is determined by determining the square root of the coefficient F for an ellipse having the form Ax 2 +Bxy+Cy 2 =F corresponding to the projection of the sampling point for which the texture is being sampled onto the surface to which the texture is to be applied, and using the determined square root of the ellipse coefficient F to determine the number of positions for which samples should be taken along the anisotropy direction in the texture.

Claims (112)

1. A method of performing anisotropic filtering when sampling a texture to provide an output sampled texture value for use when rendering an output in a graphics processing system, the method comprising:

when sampling a texture using anisotropic filtering to provide an output sampled texture value for a position x, y in the texture:

determining a number of positions for which to sample the texture along an anisotropy direction along which samples will be taken in the texture by:

determining the square root of the coefficient F for an ellipse having the form Ax 2 +Bxy+Cy 2 =F corresponding to the projection of the sampling point for which the texture is being sampled onto the surface to which the texture is to be applied, where x and y are the coordinates of the position in the texture for which the output sampled texture value is to be provided; and

using the determined square root of the ellipse coefficient F, determining a number of positions for which samples should be taken along the anisotropy direction in the texture;

the method further comprising:

taking a sample or samples along the anisotropy direction in the texture based on the determined number of positions; and

using the sample or samples taken along the anisotropy direction in the texture to provide an output sampled texture value for use for the position in the texture that is being sampled.

2. The method of claim 1 , wherein the square root of the ellipse coefficient F is determined from the derivatives of the texture coordinates, dTdx, dTdy, as follows:

F _sqrt=abs(dTd x.y *dTd y.x −dTd x.x *dTd y.y )

where x, y is the position in the texture for which an output sampled texture value is required.

3. The method of claim 1 , wherein the square root of the ellipse coefficient F is used as a scaling factor when determining a number of positions for which samples should be taken along the anisotropy direction in the texture.

4. The method of claim 1 , further comprising determining the ellipse coefficients A, B and C, and using the determined ellipse coefficients A, B and C and the square root of the ellipse coefficient F to determine the number of positions to sample as follows:

root=sqrt(( A−C ){circumflex over ( )}2 +B{circumflex over ( )} 2)

aniso_degree=( A+C +root)/(2.0 *F _sqrt)

where A, B, C and F are the ellipse coefficients for the ellipse that 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 determined number of positions in the texture to be sampled.

5. The method of claim 1 , further comprising determining a level of detail (LOD) at which to sample the texture as follows:

lod=0.5*(2.0*log 2( F _sqrt)+1.0−log 2( A+C +root))

where:

lod is the determined level of detail;

root=sqrt((A−C){circumflex over ( )}2+B{circumflex over ( )}2);

A, B, and C are the ellipse coefficients; and

F_sqrt is the square root of the ellipse coefficient F.

6. The method of claim 1 , further comprising determining a level of detail (LOD) at which to sample the texture by:

determining a first level of detail at which to sample the texture using a first level of detail determination process;

determining a second level of detail at which to sample the texture using a second, different level of detail determination process;

and

selecting one of the first and second determined levels of detail as the level of detail at which to sample the texture.

7. A method of performing anisotropic filtering when sampling a texture to provide an output sampled texture value for use when rendering an output in a graphics processing system, the method comprising:

when sampling a texture that is provided as two or more mipmaps using anisotropic filtering to provide an output sampled texture value for a position x, y in the texture:

determining a level of detail at which to sample the texture, by:

determining the square root of the coefficient F for an ellipse having the form Ax 2 +Bxy+Cy 2 =F corresponding to the projection of the sampling point for which the texture is being sampled onto the surface to which the texture is to be applied, where x and y are coordinates of the position in the texture for which the output sampled texture value is to be provided; and

using a log 2 operation on the determined square root of the ellipse coefficient F to determine the level of detail at which to sample the texture;

the method further comprising:

using the determined level of detail to select one or more of the mipmap levels for the texture from which to take samples to provide the output sampled texture value;

taking a sample or samples for one or more positions along an anisotropy direction in the texture in the selected one or more mipmap levels; and

using the sample or samples taken along the anisotropy direction in the one or more mipmap levels to provide an output sampled texture value for use for the position in the texture that is being sampled.

8. The method of claim 7 , further comprising determining a level of detail (LOD) at which to sample the texture by:

determining a first level of detail at which to sample the texture using a first level of detail determination process;

determining a second level of detail at which to sample the texture using a second, different level of detail determination process;

and

selecting one of the first and second determined levels of detail as the level of detail at which to sample the texture.

9. The method of claim 8 , comprising determining a level of detail at which to sample the texture as follows:

lod_clamped=0.5*(log 2( A+C +root)−1.0)−log 2(max_aniso)

lod_unclamped=0.5*(2.0*log 2( F _sqrt)+1.0−log 2( A+C +root))

lod=max(lod_clamped,lod_unclamped)

where:

lod is the determined level of detail;

root=sqrt((A−C){circumflex over ( )}2+B{circumflex over ( )}2);

A, B, and C are the ellipse coefficients;

F_sqrt is the square root of the ellipse coefficient F; and

max_aniso is a permitted maximum number of positions for which to sample the texture.

10. The method of claim 7 , wherein the square root of the ellipse coefficient F is determined from the derivatives of the texture coordinates, dTdx, dTdy, as follows:

F _sqrt=abs(dTd x.y *dTd y.x −dTd x.x *dTd y.y )

where x, y is the position in the texture for which an output sampled texture value is required.

11. The method of claim 7 , wherein the square root of the ellipse coefficient F is used as a scaling factor when determining a number of positions for which samples should be taken along the anisotropy direction in the texture.

12. The method of claim 7 , further comprising determining the ellipse coefficients A, B and C, and using the determined ellipse coefficients A, B and C and the square root of the ellipse coefficient F to determine the number of positions to sample as follows:

root=sqrt(( A−C ){circumflex over ( )}2+ B{circumflex over ( )} 2)

aniso_degree=( A+C +root)/(2.0 *F _sqrt)

where A, B, C and F are the ellipse coefficients for the ellipse that 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 determined number of positions in the texture to be sampled.

13. The method of claim 7 , further comprising determining a level of detail (LOD) at which to sample the texture as follows:

lod=0.5*(2.0*log 2( F _sqrt)+1.0−log 2( A+C +root))

where:

lod is the determined level of detail;

root=sqrt((A−C){circumflex over ( )}2+B{circumflex over ( )}2);

A, B, and C are the ellipse coefficients; and

F_sqrt is the square root of the ellipse coefficient F.

14. A method of performing anisotropic filtering when sampling a texture to provide an output sampled texture value for use when rendering an output in a graphics processing system, the method comprising:

when sampling a texture that is provided as two or more mipmaps using anisotropic filtering to provide an output sampled texture value for a position x, y in the texture:

determining a level of detail at which to sample the texture, by:

determining a first level of detail at which to sample the texture using a first level of detail determination process;

determining a second level of detail at which to sample the texture using a second, different level of detail determination process;

and

selecting one of the first and second determined levels of detail as the level of detail at which to sample the texture;

the method further comprising:

using the selected level of detail to select one or more of the mipmap levels for the texture from which to take samples to provide the output sampled texture value;

taking a sample or samples for one or more positions along an anisotropy direction in the texture in the selected one or more mipmap levels; and

using the sample or samples taken along the anisotropy direction in the one or more mipmap levels to provide an output sampled texture value for use for the position in the texture that is being sampled.

15. The method of claim 14 , comprising determining a level of detail at which to sample the texture as follows:

lod_clamped=0.5*(log 2( A+C +root)−1.0)−log 2(max_aniso)

lod_unclamped=0.5*(2.0*log 2( F _sqrt)+1.0−log 2( A+C +root))

lod=max(lod_clamped,lod_unclamped)

where:

lod is the determined level of detail;

root=sqrt((A−C){circumflex over ( )}2+B{circumflex over ( )}2);

A, B, and C are the ellipse coefficients;

F_sqrt is the square root of the ellipse coefficient F; and

max_aniso is a permitted maximum number of positions for which to sample the texture.

16. The method of any claim 14 , further comprising:

determining an anisotropy direction along which to take samples in the texture by:

determining X and Y components of a vector of arbitrary length corresponding to the direction of the major axis of the assumed elliptical projection of the sampling point onto the surface to which the texture is being applied;

normalising the determined X and Y vector components to provide X and Y components for a unit vector corresponding to the direction of the major axis of the elliptical footprint of the sampling point as projected on to the surface to which the texture is being applied; and

using the so-determined X and Y components for the unit vector corresponding to the direction of the major axis of the elliptical projection of the sampling point onto the surface to which the texture is being applied as the anisotropy direction along which to take samples in the texture.

17. A non-transitory computer readable storage medium comprising computer software code which when executing on at least one processor performs a method of performing anisotropic filtering when sampling a texture to provide an output sampled texture value for use when rendering an output in a graphics processing system, the method comprising:

when sampling a texture using anisotropic filtering to provide an output sampled texture value for a position x, y in the texture:

determining a number of positions for which to sample the texture along an anisotropy direction along which samples will be taken in the texture by:

determining the square root of the coefficient F for an ellipse having the form Ax 2 +Bxy+Cy 2 =F corresponding to the projection of the sampling point for which the texture is being sampled onto the surface to which the texture is to be applied, where x and y are the coordinates of the position in the texture for which the output sampled texture value is to be provided; and

using the determined square root of the ellipse coefficient F, determining a number of positions for which samples should be taken along the anisotropy direction in the texture;

the method further comprising:

taking a sample or samples along the anisotropy direction in the texture based on the determined number of positions; and

using the sample or samples taken along the anisotropy direction in the texture to provide an output sampled texture value for use for the position in the texture that is being sampled.

18. The non-transitory computer readable storage medium of claim 17 , wherein the square root of the ellipse coefficient F is determined from the derivatives of the texture coordinates, dTdx, dTdy, as follows:

F _sqrt=abs(dTd x.y *dTd y.x −dTd x.x *dTd y.y )

where x, y is the position in the texture for which an output sampled texture value is required.

19. The non-transitory computer readable storage medium of claim 17 , wherein the square root of the ellipse coefficient F is used as a scaling factor when determining a number of positions for which samples should be taken along the anisotropy direction in the texture.

20. The non-transitory computer readable storage medium of claim 17 , further comprising determining the ellipse coefficients A, B and C, and using the determined ellipse coefficients A, B and C and the square root of the ellipse coefficient F to determine the number of positions to sample as follows:

root=sqrt(( A−C ){circumflex over ( )}2+ B{circumflex over ( )} 2)

aniso_degree=( A+C +root)/(2.0 *F _sqrt)

where A, B, C and F are the ellipse coefficients for the ellipse that 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 determined number of positions in the texture to be sampled.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 31, 2022
From: FIELDING, EDVARD; SYMES, DOMINIC HUGO
To: ARM LIMITED
Reel/Frame 058907/0564 →
Priority Claims (1)
GB 2111006 · Jul 30, 2021 · national
Continuity (1)
Related Publication 20220215613A1 · Jul 7, 2022