CN101751687B - Method and device for determining texture mapping parameters to define and represent pixel projection footprints - Google Patents

Method and device for determining texture mapping parameters to define and represent pixel projection footprints Download PDF

Info

Publication number
CN101751687B
CN101751687B CN200810207277.6A CN200810207277A CN101751687B CN 101751687 B CN101751687 B CN 101751687B CN 200810207277 A CN200810207277 A CN 200810207277A CN 101751687 B CN101751687 B CN 101751687B
Authority
CN
China
Prior art keywords
value
footprint
log
lut
difference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN200810207277.6A
Other languages
Chinese (zh)
Other versions
CN101751687A (en
Inventor
陈秦玉
周骥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Micro Devices Shanghai Co Ltd
Original Assignee
Advanced Micro Devices Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced Micro Devices Shanghai Co Ltd filed Critical Advanced Micro Devices Shanghai Co Ltd
Priority to CN200810207277.6A priority Critical patent/CN101751687B/en
Priority to PCT/CN2009/075707 priority patent/WO2010069269A1/en
Publication of CN101751687A publication Critical patent/CN101751687A/en
Application granted granted Critical
Publication of CN101751687B publication Critical patent/CN101751687B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping

Abstract

The invention discloses a method for calculating texture mapping parameters in an image processor to define and represent footprints projected by a pixel in texture mapping. The method comprises the following steps: calculating a difference value t based on a pair of specific offset guiding vectors (ux and vx) and (uy and vy); determining the scope AngleRg of a footprint direction value Alpha and obtaining an approximate reference value t' of the difference value t; and obtaining a footprint reference direction value Alpha' corresponding to the reference value t' in the AngleRg from LUT. Compared with the accurate calculation of the texture mapping parameters, the method is improved. Compared with the simple approximate value of the texture mapping parameters, better image quality is obtained by adopting the method.

Description

Determine that texture mapping parameters is with the method and apparatus of define and represent pixel projection footprints
Technical field
The present invention relates to computer graphics.More specifically, the present invention relates to calculate method and the device of texture mapping parameters footprint of the projection in texture with define and represent pixel in image processor.
Background technology
Texture is for calculating the color of fragment that produced by the grating of figure scenery or one dimension, two dimension or the multi-dimension array of the data items of shape.Texture can be view data, color or transmission data, roughness/smoothness data, reflectivity data etc.Conventionally, the texture value of calculating pixel means and filtrator (is represented) project to texture space (being represented by u and v coordinate) from screen space by x and y coordinate.In texture space, corresponding to the region of pixel, be called as in " footprint " of this pixel.Pixel can be approximately round in screen space.For two-dimentional texture, it is oval that the corresponding footprint in texture space is approximately.
For the reason of low hardware cost and speed, isotropy is filtered ellipse is approximately to round.Isotropy is filtered in two texture space dimension u and v and is filtered comparably, and obtains the high image quality that its footprint has the pixel that the length of main and auxiliary texture shaft is close.Yet texture stretching, view rotation and perspective can cause the elongation of footprint.In this case, oval good being similar to is no longer round.A kind of desirable filtrator should have approximate elliptical shape.
For addressing the above problem, the filtrator of the elliptical shape that more approaches this ideal filtrator of coupling is used in anisotropic filtering.As everyone knows, all ellipses all have a longest diameter that is called as main shaft, and the shortest diameter that is called as auxiliary axle.Filter on the contrary with isotropy, it is less that anisotropic filtering causes having the distortion of footprint of main shaft that length is not close and auxiliary axle.For high-quality texture is provided, expectation obtains the accurate Calculation to the length of main shaft and auxiliary axle.
Figure 1A shows the footprint 115 comprising than the auxiliary axle 125 of main shaft 130 much shorters.From one or more mapping levels, read along the texture sample of main shaft 130, and this texture sample is mixed to produce pixel color.Use be take and 2 the end of as, to the length of auxiliary axle 125, asked the level of detail (LOD) of the mark of logarithm come to determine the level of reading from sample.Verified is being very complicated and expensive to the accurate Calculation of the length of main shaft 130 and auxiliary axle 125 aspect performance and/or chip size.
For simplifying, calculate, proposed multiple different scheme and be similar to main shaft and auxiliary axle.Figure 1B shows three vectors in anisotropy footprint 115.With vector 145 and vector 150, determine main shaft and auxiliary axle, these two vectors are not exclusively vertical.According to prior art, by the length of vector 145 and vector 150, determine main shaft.The approximate main shaft of long vector 150 and perpendicular to the approximate auxiliary axle of vector 155 of main shaft.Fig. 1 C shows four vectors in anisotropy footprint.With vector 145 and vector 150, determine main shaft and auxiliary axle, these two vectors are not exclusively vertical.According to another prior art, the main shaft of vector 160 approximate footprints 115, it is by suing for peace and this and evolution are calculated vector 145 and vector 150.Similarly, the auxiliary axle of vector 165 approximate footprints 115, it deducts vector 150 by vector 145 and this difference evolution is calculated.Thereby simplified the calculating of the length of main shaft and auxiliary axle.Yet picture quality can not be satisfactory.
3D texture (three-D grain) is the logical extension of traditional 2D texture.3D texture can be considered to a plurality of texture thin slices for generation of 3-D view mapping.Conventionally with 3 coordinates, represent 3D texture.With 2D texture classes seemingly, the coordinate of 3D texture is in each dimension from 0 to 1.The same with 2D texture to the control of the filtration treatment in 3D texture, that is, need the participation of parametric texture.
At present, for the algorithm that provides derivative to proofread and correct at DX10/11, be very complicated, relate to repeatedly division, multiplication, evolution and logarithm operation etc.The in the situation that of 3D texture, comprise more calculation operations, be almost unacceptable.As a result, it is exceedingly difficult on hardware, realizing this algorithm.
Therefore the algorithm that, needs a kind of simplification is to save logic region and keep balance between the degree of accuracy of anisotropic texture mapping calculation of parameter and chip size.
Summary of the invention
For solve the problem exist in aforementioned techniques, an object of the present invention is to provide a kind ofly for calculating the method for texture mapping parameters and device to reduce chip size, and improve in some cases picture quality.
According to an aspect of the present invention, provide a kind of and comprised the method for texture mapping parameters footprint of the projection in texture with define and represent pixel: based on a pair of specific local derviation vector (u for determining at image processor x, v x) and (u y, v y) calculated difference t; Determine the scope AngleRg at footprint direction value α place, and obtain the approximate reference difference t ' of difference t; And from LUT, in AngleRg, obtain the footprint reference direction value α ' corresponding to reference difference t '.
Preferably, difference t is based on oval coefficient, and oval coefficient is based on a pair of specific local derviation vector (u x, v x) and (u y, v y).
Preferably, oval coefficient is defined as
Figure GSB0000112650370000031
b=2 (u xv x+ u yv y),
Figure GSB0000112650370000032
or A = u x 2 + u y 2 , B=2(u xv x+u yv y), C = v x 2 + v y 2 .
The method of calculating texture mapping parameters obtains the direction α ' of main shaft by searching LUT, and sin2 α ' and cos2 α ' calculate the texture mapping parameters such as the length of main shaft and auxiliary axle and LOD value etc.
Particularly, it can be a kind of for calculate the method for anisotropic texture mapping parameter footprint of the projection in texture with define and represent pixel at image processor, comprising: based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient b=2 (u xv x+ u yv y) and
Figure GSB0000112650370000042
based on oval coefficient A, B and C calculate log (| A-C|) and log (| the difference t B|); Compare A-C, B and 0 to determine the scope AngleRg at footprint anisotropic orientation value α place, and obtain the approximate reference difference t ' of difference t; From LUT, within the scope of AngleRg, obtain reference direction value α ' and sin2 α ' and cos2 α ' corresponding to the footprint of reference difference t '; And based on A, B, C, sin2 α ' and cos2 α ', calculate the length of main shaft of anisotropic texture mapping parameter and the length of the auxiliary axle of anisotropic texture mapping parameter.
Preferably, this pair of specific local derviation vector (u x, v x) and (u y, v y) partial derivative for y that is respectively texture coordinate u and v for the partial derivative of x and texture coordinate u and v.
Preferably, if 0 < B < A-C or A-C < B < 0, AngleRg is (0, π/8); If 0 < A-C < B or B < A-C < 0, AngleRg is (π/8, π/4); If 0 < A-C <-B or-B < A-C < 0, AngleRg is (π/4,3 π/8); And if A-C <-B < 0 or 0 <-B < A-C, AngleRg is (3 π/8, pi/2).
Preferably, based on A, B, C, sin2 α ' and the length of main shaft of cos2 α ' calculating anisotropic texture mapping parameter and the length of the auxiliary axle of anisotropic texture mapping parameter, comprise: calculate (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to obtain the first length and the second length; Using the shorter one in main shaft anisotropic texture mapping parameter and the first length and the second length compared with elder in the first length and the second length as auxiliary axle anisotropic texture mapping parameter.
Preferably, the method further comprises the step of constructing LUT.
Preferably, for interior in (0, pi/2) scope, to have particular step size footprint anisotropic orientation α, LUT comprises each value of footprint anisotropic orientation α, corresponding sin2 α value, cos2 α value and reference difference t ', wherein, reference difference t ' is similar to difference t.More preferably, if t=log (| A-C|)-log (| B|), by log (| cot (2 α) |), represent t '; If t=log (| B|)-log (| A-C|), by log (| tan (2 α) |), represent t '.
Preferably, for in (0, π/8) scope, there is the footprint anisotropic orientation α of particular step size, LUT comprises each value of footprint anisotropic orientation α and corresponding sin2 α, the value of cos2 α, wherein, reference difference t ' is represented by log (| tan (2 α) |); And in (π/8, footprint anisotropic orientation α π/4) in scope, with particular step size, LUT comprises each value of footprint anisotropic orientation α and corresponding sin2 α, the value of cos2 α, and wherein, reference difference t ' is represented by log (| cot (2 α) |).
Preferably, the method further comprises the step of the level of detail that calculates anisotropic texture mapping parameter.
Preferably, the method further comprises the step of calculating logarithm ratio by the first length and the second length.
Preferably, the step of structure LUT comprises: for (0, footprint anisotropic orientation α pi/2) in scope, with particular step size, calculate value and the sin2 α of correspondence and the value of cos2 α of each footprint anisotropic orientation α, wherein, the described reference difference t ' being represented by log (| cot (2 α) |) be similar to difference t=log (| A-C|)-log (| B|); And the value of the value of described each footprint anisotropic orientation α of calculating of tissue and corresponding sin2 α and cos2 α and described reference difference t ' are to produce LUT.
Preferably, the step of structure LUT comprises: for (0, footprint anisotropic orientation α pi/2) in scope, with particular step size, calculate value and the sin2 α of correspondence and the value of cos2 α of each footprint anisotropic orientation α, wherein, the described reference difference t ' being represented by log (| tan (2 α) |) be similar to difference t=t=log (| B|)-log (| A-C|); And the value of the value of described each footprint anisotropic orientation α of calculating of tissue and corresponding sin2 α and cos2 α and described reference difference t ' are to produce LUT.
Preferably, the step of structure LUT comprises: for (0, π/8) in scope, there is the footprint anisotropic orientation α of particular step size, calculate the value of each footprint anisotropic orientation α and the value of corresponding sin α, cos α, sin2 α and cos2 α with structure LUT 1; For interior in (π/8, π/4) scope, to there is particular step size footprint anisotropic orientation α, calculate the value of the value of each footprint anisotropic orientation α and sin α, cos α, sin2 α and the cos2 α of correspondence with structure LUT 2; And merging LUT 1and LUT 2, and delete redundant columns sin2 α and cos2 α to obtain LUT.
Preferably, in LUT, directly comprise the value of sin α and cos α, can obtain from LUT middle ground each value and the sin2 α of correspondence and the value of cos2 α of footprint anisotropic orientation α simultaneously.
Preferably, if scope AngleRg is (0, π/8), obtain being similar to difference t=log (| B|)-log (| reference difference t ' A-C|); If scope AngleRg is (0, π/4), obtain being similar to difference t=log (| A-C|)-log (| reference difference t ' B|).
Preferably, for the anisotropic direction α ∈ (π/4, pi/2) of footprint, can be by using trigonometric function conversion formula to obtain the value of sin2 α and cos2 α from LUT.
Preferably, use binary chop to obtain being similar to the reference difference t ' of difference t.
Preferably, reference difference t ' is corresponding to index, and this index is for obtaining footprint anisotropy reference direction value α ' and corresponding sin2 α ' and the cos2 α ' in scope AngleRg from LUT.
Oval matrix can be
M = T * T &prime; = Ux Uy Vx Vy * Ux Vx Uy Vy = Ux 2 + Uy 2 UxVx + UyVy UxVx + UyVy Vx 2 + Vy 2 = A B / 2 B / 2 C
On the other hand, matrix also can be defined as:
M = T &prime; * T = Ux 2 + Vx 2 UxUy + VxVy UxUy + VxVy Uy 2 + Vy 2 , That is, oval coefficient wherein can be defined as A=Ux 2+ Vx 2, B=2 (UxUy+VxVy), C=Uy 2+ Vy 2.By adding the 3rd variable w and arranging: A=Ux 2+ Vx 2+ Wx 2, B=2 (UxUy+VxVy+WxWy), C=Uy 2+ Vy 2+ Wy 2, said method also can be for 3D texture.
According to a further aspect in the invention, provide a kind of computer program.In one embodiment, computer program includes but not limited to that carrying is for carrying out at least one the medium in any one one or more programs of said method.
According to another aspect of the invention, provide a kind of for calculating the device of texture mapping parameters, having comprised: oval coefficient calculation unit, for based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient; Difference computational unit, for based on oval coefficient calculations difference t; Comparing unit, for determining footprint direction value α in-scope AngleRg; Reference difference obtains unit, for obtaining the reference difference t ' that is similar to difference t; And LUT searches unit, for obtain the footprint reference direction value α ' corresponding to reference difference t ' in LUT AngleRg.
Particularly, this device can be used in and calculates anisotropic texture mapping parameter, by comprising with lower unit, realizes: oval coefficient calculation unit, and for based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient
Figure GSB0000112650370000081
b=2 (u xv x+ u yv y) and
Figure GSB0000112650370000082
difference computational unit, for calculate log (| A-C|) and log (| the difference t B|); Comparing unit, for comparing A-C, B and 0 to determine footprint anisotropic orientation value α in-scope AngleRg; Reference difference obtains unit, for obtaining the reference difference t ' that is similar to difference t; LUT searches unit, from LUT, in AngleRg, obtain corresponding to reference difference t ' footprint anisotropy reference direction value α ' and corresponding sin2 α ' and cos2 α '; And parameter calculation unit, for calculate the length of main shaft of anisotropic texture mapping parameter and the length of the auxiliary axle of anisotropic texture mapping parameter based on A, B, C, sin2 α ' and cos2 α '.
Preferably, parameter calculation unit further comprises length computation unit, for calculating (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to obtain the first length and the second length; And discriminating unit, for using the shorter one in main shaft anisotropic texture mapping parameter and the first length and the second length compared with elder of the first length and the second length as auxiliary axle anisotropic texture mapping parameter.
Preferably, this anisotropic device comprises LUT tectonic element, for in (0, pi/2) scope, there is the footprint anisotropic orientation α of particular step size, structure comprises the LUT of each value of footprint anisotropic orientation α and the value of corresponding sin2 α, cos2 α.
Preferably, this anisotropic device comprises LUT tectonic element, be used for constructing LUT, this LUT is for (0, footprint anisotropic orientation α π/8) in scope, with particular step size, comprise each value of footprint anisotropic orientation α and corresponding sin2 α, the value of cos2 α, wherein, reference difference t ' is represented by log (| tan (2 α) |); And in (π/8, footprint anisotropic orientation α π/4) in scope, with particular step size, comprise each value of footprint anisotropic orientation α and corresponding sin2 α, the value of cos2 α, wherein, reference difference t ' is represented by log (| cot (2 α) |).
Preferably, this parameter calculation apparatus is for calculating the level of detail of anisotropic texture mapping parameter.
Preferably, this parameter calculation apparatus is used for using the first length and the second length computation logarithm ratio (logratio).
According to another aspect of the invention, provide a kind of for calculate the method for texture mapping parameters footprint of the projection in texture with define and represent pixel at image processor, having comprised: based on a pair of specific local derviation vector (u x, v x, w x) and (u y, v y, w y) calculate oval coefficient A=Ux 2+ Vx 2+ Wx 2, B=2 (UxUy+VxVy+WxWy), C=Uy 2+ Vy 2+ Wy 2; Based on oval coefficient A, B and C, carry out calculated difference t; Determine the scope AngleRg at footprint anisotropic orientation value α place, and obtain being similar to the reference difference t ' of difference t; And from LUT, in AngleRg, obtain the footprint reference direction value α ' corresponding to reference difference t '.
Should be appreciated that general description and detailed description below are above just all for example and describe to further describe object of the present invention.
In description below, by providing, of the present inventionly from instructions of the present invention and embodiment part, obtain further feature and advantage.Can from instructions, claim and accompanying drawing, obtain object of the present invention and other advantage
Accompanying drawing explanation
By forming the accompanying drawing of the part of this instructions, can easily understand the present invention, shown in the drawings of embodiments of the invention, and for coming together to explain the principle of the embodiment of the present invention with instructions.
Figure 1A shows the prior art application of superficial makings sample;
Figure 1B shows of the prior art for three vectors in the anisotropy footprint 115 of definite main shaft and auxiliary axle;
Fig. 1 C shows of the prior art for four vectors in the anisotropy footprint 115 of definite main shaft and auxiliary axle;
Fig. 2 A shows the texture mapping parameters that is mapped to neighbor of the many aspects according to the present invention;
Fig. 2 B show according to one or more aspects of the present invention for determining two vectors in the anisotropic footprint of anisotropic main shaft and auxiliary axle;
Fig. 3 show according to one or more aspects of the present invention for calculating the method for texture mapping parameters;
Fig. 4 show according to many aspects of the present invention for calculating the first embodiment of the method for anisotropic texture mapping parameter;
Fig. 5 show according to many aspects of the present invention for calculating the 3rd embodiment of the method for anisotropic texture mapping parameter;
Fig. 6 A show according to many aspects of the present invention for calculating the 4th embodiment of the method for anisotropic texture mapping parameter;
Fig. 6 B shows the method for constructing LUT in the 4th embodiment;
Fig. 7 A show according to many aspects of the present invention for calculating the 5th embodiment of the method for anisotropic texture mapping parameter;
Fig. 7 B shows the method for constructing LUT in the 5th embodiment;
Fig. 8 A show according to many aspects of the present invention for calculating the 6th embodiment of the method for anisotropic texture mapping parameter;
Fig. 8 B shows the method for constructing LUT in the 6th embodiment;
Fig. 9 shows the binary chop structure in the 6th embodiment; And
Figure 10 show according to many aspects of the present invention for calculating the schematic diagram of the device of texture mapping parameters.
Embodiment
In the following description, show a plurality of details so that the more detailed understanding to many aspects of the present invention to be provided.Yet, it will be understood by those of skill in the art that the present invention can be in the situation that do not have one or more realization the in these details.In other words, known features is not described to avoid fuzzy the present invention.
Anisotropic main shaft and auxiliary axle determine to represent that pixel is to the footprint of the projection in texture.In the prior art, accurately determining of main shaft and auxiliary axle needs complicated calculating, and it is for realizing and there is no cost benefit in the chip size restriction at image processor.In the prior art, for calculating the simple approximate main shaft of texture mapping parameters and the requirement that auxiliary axle does not reach picture quality.In the present embodiment of the present invention, by searching, LUT obtains major axes orientation α ', sin2 α ' and cos2 α ' calculates such as the length of main shaft and auxiliary axle and the anisotropic texture mapping parameter of LOD value.Thus, compare the present invention with the accurate Calculation of texture mapping parameters and obtained improved performance, compare the more excellent picture quality that the present invention has obtained with texture mapping parameters simple approximate.
Fig. 2 A shows according to four pixels of texture coordinate u, v corresponding in (x, y) screen space of one or more aspects of the present invention, pixel 200, pixel 201, pixel 202 and pixel 203.Texture coordinate w only increases when the mapping for three-D grain.
Fig. 2 B shows the footprint of four pixels in texture space: pixel 200,201,202 and 203.Point 210,211 and 212 is respectively the texture coordinate of pixel 200,201 and 202.The texture coordinate of pixel 200 (0,0) is being point 210 shown in Fig. 2 B, the texture coordinate (u of pixel 201 1, v 1) shown in Fig. 2 B, be point 211, the texture coordinate (u of pixel 202 2, v 2) shown in Fig. 2 B, be point 212.Differential vector 221 is that (u, v) is for the local derviation of x.Differential vector 222 is that (u, v) is for the local derviation of y.
Fig. 3 shows according to the method for the calculating texture mapping parameters of one or more aspects of the present invention.
In step 302, based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculated difference t;
In step 304, determine the scope AngleRg at footprint direction value α place, and obtain the approximate reference difference t ' of difference t; And
In step 306, from LUT, in AngleRg, obtain the footprint reference direction value α ' corresponding to reference difference t '.
For (0, the anisotropic orientation α pi/2) with the footprint of particular step size, LUT can comprise anisotropic each direction α of footprint and corresponding sin2 α, the value of cos2 α, wherein, the reference difference t ' being represented by log (| cot (2 α) |) be similar to difference t=log (| A-C|)-log (| B|).
For (0, the anisotropic orientation α pi/2) with the footprint of particular step size, LUT can also comprise anisotropic each direction α of footprint and corresponding sin2 α, the value of cos2 α, wherein, the reference difference t ' being represented by log (| tan (2 α) |) be similar to difference t=log (| B|)-log (| A-C|).
LUT can also comprise each value of anisotropic direction α of the footprint in (0, π/8) scope with particular step size and corresponding sin2 α, the value of cos2 α, and wherein, reference difference t ' is represented by log (| tan (2 α) |); And comprise each value of anisotropic direction α of the footprint in (π/8, π/4) scope with particular step size and corresponding sin2 α, the value of cos2 α, wherein, reference difference t ' is represented by log (| cot (2 α) |).
The value of log (| cot (2 α) |) or log (| tan (2 α) |) can, by hard coded for binary chop, can be loaded into LUT in ROM in advance.
The first embodiment
Fig. 4 shows a plurality of embodiment according to the present invention for calculating the first embodiment of the method for texture mapping parameters.
Table 1 shows LUT, this LUT is included in (0, pi/2) take each value of anisotropic orientation α of the footprint that π/60 are particular step size and corresponding sin2 α, the value of cos2 α in, wherein, the reference difference t ' being represented by log (| cot (2 α) |) be similar to difference t=log (| A-C|)-log (| B|).
As shown in Figure 4, in step 402, based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient
Figure GSB0000112650370000141
b=2 (u xv x+ u yv y) and
Figure GSB0000112650370000142
Table 1
Reference difference t ' α sin2α cos2α
0.978379 1π/60 0.104528 0.994522
0.672525 2π/60 0.207912 0.978148
0.488233 3π/60 0.309017 0.951057
0.351416 4π/60 0.406737 0.913545
0.238561 5π/60 0.5 0.866025
0.138738 6π/60 0.587785 0.809017
0.045562 7π/60 0.66913 0.743145
-0.045562 8π/60 0.743145 0.66913
-0.138738 9π/60 0.809017 0.587785
-0.238561 10π/60 0.866025 0.5
-0.351416 11π/60 0.913545 0.406737
-0.488233 12π/60 0.951057 0.309017
-0.672525 13π/60 0.978148 0.207912
-0.978379 14π/60 0.994522 0.104528
-0.978379 16π/60 0.994522 -0.104528
-0.672525 17π/60 0.978148 -0.207912
-0.488233 18π/60 0.951057 -0.309017
-0.351416 19π/60 0.913545 -0.406737
-0.238561 20π/60 0.866025 -0.5
-0.138738 21π/60 0.809017 -0.587785
-0.045562 22π/60 0.743145 -0.66913
0.045562 23π/60 0.66913 -0.743145
0.138738 24π/60 0.587785 -0.809017
0.238561 25π/60 0.5 -0.866025
0.351416 26π/60 0.406737 -0.913545
0.488233 27π/60 0.309017 -0.951057
0.672525 28π/60 0.207912 -0.978148
0.978379 29π/60 0.104528 -0.994522
In step 404, based on oval coefficient A, B and C calculated difference t=log (| A-C|)-log (| B|).Suppose to obtain A=4, B=-2 and C=1 in step 402, difference t=log (| 4-1|)-log (|-2|)=log3-log2=0.17609.
In step 406, relatively A-C, B and 0 are to determine the scope AngleRg at footprint anisotropic orientation value α place.Compare A-C, B and 0, if 0 < B < A-C or A-C < B < 0, scope AngleRg is (0, π/8); If 0 < A-C < B or B < A-C < 0, scope AngleRg is (π/8, π/4); If 0 < A-C <-B or-B < A-C < 0, scope AngleRg is (π/4,3 π/8); And if A-C <-B < 0 or 0 <-B < A-C, scope AngleRg is (3 π/8, pi/2).For A=4, B=-2 and C=1,0 <-B < A-C, so the anisotropic reference direction value α ' of footprint is in (3 π/8, pi/2) scope.That is, the anisotropic reference direction value α ' ∈ (3 π/8, pi/2) of footprint.
Subsequently, obtain being similar to the reference difference t ' of difference t, wherein, reference difference t ' is represented by log (| cot (2 α) |).For difference t=0.17609, by 0.17609, compare with representing the value in the reference difference t ' row of log (| cot (2 α) |), to obtain immediate reference difference t '=0.138738.
In step 408, within the scope of the AngleRg in LUT, obtain corresponding to the anisotropic reference direction value α ' of the footprint of reference difference t ' and corresponding sin2 α ' and cos2 α '.Reference difference t '=0.138738 is corresponding to two different α, sin2 α in LUT and cos2 α group.A group is π/60, α=6, sin2 α=0.587785 and cos2 α=0.809017, and another group is π/60, α=24, sin2 α=0.587785 and cos2 α=-0.809017.Because π/60, α=24 are in the scope of AngleRg (3 π/8, pi/2), so the anisotropic reference direction value α ' of footprint equals 24 π/60, and sin2 α '=0.587785, cos2 α '=-0.809017.
In step 410, calculate (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to obtain the first length and the second length.
In step 412, the first length and the second length are compared, using will length as main axis length, will shorter length as auxiliary shaft length.
In step 414, calculate main axis length and take 2 logarithms that are the end and take 2 logarithms that are the end to obtain auxiliary axle logarithm value to obtain main shaft logarithm value and to calculate auxiliary shaft length, that is, and LOD.
In step 416, by main shaft logarithm value, deduct auxiliary axle logarithm value and obtain logarithm ratio.This logarithm ratio equals ratio and take 2 logarithm value that are the end.
The second embodiment
In the present embodiment, LUT is included in (0, pi/2) take each value and corresponding sin2 α and the value of cos2 α of anisotropic orientation α of the footprint that π/60 are particular step size in, wherein, the reference difference t ' being represented by log (| cot (2 α) |) be similar to difference t=log (| A-C|)-log (| B|).Compare with the first embodiment, unique is not both in step 404, calculating be difference t=log (| B|)-log (| A-C|).
The 3rd embodiment
Fig. 5 shows according to of the present invention for calculating the 3rd embodiment of the method for texture mapping parameters.
Table 2 shows another LUT, this LUT is included in (0, π/8) take each value of the footprint anisotropic orientation α that π/60 are particular step size and corresponding sin2 α, the value of cos2 α in, wherein, reference difference t ' is represented by log (| tan (2 α) |).LUT is also included in take each value of anisotropic orientation α of the footprint that π/60 are particular step size and corresponding sin2 α, the value of cos2 α in (π/8, π/4), and wherein, reference difference t ' is represented by log (| cot (2 α) |).
Table 2
Reference difference t ' α sin2α cos2α
-0.978379 1π/60 0.104528 0.994522
-0.672525 2π/60 0.207912 0.978148
-0.488233 3π/60 0.309017 0.951057
-0.351416 4π/60 0.406737 0.913545
-0.238561 5π/60 0.5 0.866025
-0.138738 6π/60 0.587785 0.809017
-0.045562 7π/60 0.66913 0.743145
0.045562 8π/60 0.743145 0.66913
0.138738 9π/60 0.809017 0.587785
0.238561 10π/60 0.866025 0.5
0.351416 11π/60 0.913545 0.406737
0.488233 12π/60 0.951057 0.309017
0.672525 13π/60 0.978148 0.207912
0.978379 14π/60 0.994522 0.104528
As shown in Figure 5, in step 502, based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient
Figure GSB0000112650370000171
b=2 (u xv x+ u yv y) and
Figure GSB0000112650370000172
In step 504, based on oval coefficient A, B and C calculate log (| A-C|) and log (| the difference t B|).Suppose to calculate A=4 in step 502, B=2, and C=1, difference t=log (| 4-1|)-log (| 2|)=log3-log2=0.17609, or difference t=log (| 2|)-log (| 4-1|)=-0.17609.
In step 506, relatively A-C, B and 0 are to determine the scope AngleRg at footprint anisotropic orientation value α place.Compare A-C, B and 0, if 0 < B < A-C or A-C < B < 0, AngleRg is (0, π/8); If 0 < A-C < B or B < A-C < 0, AngleRg is (π/8, π/4); If 0 < A-C <-B or-B < A-C < 0, AngleRg is (π/4,3 π/8); And if A-C <-B < 0 or 0 <-B < A-C, AngleRg is (3 π/8, pi/2).For A=4, B=2 and C=1,0 < B < A-C, so the anisotropy reference direction value α ' of footprint is in (0, π/8) scope.That is, the anisotropy reference direction value α ' ∈ (0, π/8) of footprint.
Subsequently, obtain being similar to the reference difference t ' of difference t.For difference t=0.17609, by 0.17609, compare to obtain immediate reference difference t '=0.138738 with reference difference.For difference t=-0.17609, by-0.17609, compare to obtain immediate reference difference t '=-0.138738 with reference difference.
In step 508, within the scope of the AngleRg in LUT, obtain the anisotropy reference direction value α ' of footprint and corresponding sin2 α ' and cos2 α '.Reference difference t '=0.138738 is corresponding to one group of α, sin2 α and cos2 α in LUT, and this group is π/60, α=9, sin2 α=0.809017 and cos2 α=0.587785.
Reference difference t '=-0.138738 is corresponding to one group of α, sin2 α and cos2 α in LUT.This group is π/60, α=6, sin2 α=0.587785 and cos2 α=0.809017.
Owing to only having 6 π/60 in AngleRg (0, π/8) scope, so π/60, anisotropy reference direction value α '=6, sin2 α '=0.587785 and cos2 α '=0.809017 of footprint.
In step 510, calculate (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to obtain the first length and the second length.
In step 512, the first length and the second length are compared, using will length as main axis length, will shorter length as auxiliary shaft length.
In step 514, calculate main axis length and take 2 logarithms that are the end and take 2 logarithms that are the end to obtain auxiliary axle logarithm value to obtain main shaft logarithm value and to calculate auxiliary shaft length, that is, and LOD.
In step 516, by main shaft logarithm value, deduct auxiliary axle logarithm value and obtain logarithm ratio.This logarithm ratio equals ratio and take 2 logarithm value that are the end.
The 4th embodiment
Fig. 6 A show according to an aspect of the present invention for calculating the 4th embodiment of the method for texture mapping parameters.Fig. 6 B shows for construct the method for LUT at the 4th embodiment.
As shown in Figure 6A, in step 600, construct look-up table LUT.As shown in Figure 6B, this step is further comprising the steps:
Step 6001, for the footprint anisotropic orientation α in (0, pi/2), take special angle as step-length, calculate value and corresponding sin2 α and the value of cos2 α of each α, the reference difference t ' wherein being represented by log (| cot (2 α) |) is similar to difference t; And
Step 6003, the value of sin2 α, the cos2 α of the value of each α of the anisotropic orientation of the footprint that tissue calculates and correspondence and reference difference t ' are to generate look-up table LUT, wherein, reference difference t ' be similar to difference t=log (| A-C|)-log (| B|).
In step 602, based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient
Figure GSB0000112650370000191
b=2 (u xv x+ u yv y) and
Figure GSB0000112650370000192
In step 604, based on oval coefficient A, B and C calculated difference t=log (| A-C|)-log (| B|).
In step 606, relatively A-C, B and 0, to determine the scope AngleRg at footprint anisotropic orientation value α place, obtain being similar to the reference difference t ' of difference t subsequently from LUT.
In step 608, from LUT, within the scope of AngleRg, obtain corresponding to the anisotropy reference direction value α ' of the footprint of reference difference t ' and corresponding sin2 α ' and cos2 α '.
In step 610, calculate (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to obtain the first length and the second length.
In step 612, the first length and the second length are compared, using will length as main axis length, will shorter length as auxiliary shaft length.
In step 614, calculate main axis length and take 2 logarithms that are the end and take 2 logarithms that are the end to obtain auxiliary axle logarithm value to obtain main shaft logarithm value and to calculate auxiliary shaft length, that is, and LOD.
In step 616, by main shaft logarithm value, deduct auxiliary axle logarithm value and obtain logarithm ratio.This logarithm ratio equals ratio and take 2 logarithm value that are the end.
The 5th embodiment
Fig. 7 A show according to an aspect of the present invention for calculating the 5th embodiment of the method for anisotropic texture mapping parameter.Fig. 7 B shows in the 5th embodiment for constructing the method for LUT.
As shown in Figure 7 A, in step 700, structure LUT.As shown in Figure 7 B, this step is further comprising the steps:
Step 7001, for the footprint anisotropic orientation α in (0, pi/2) scope, take special angle as step-length, calculate value and corresponding sin2 α and the value of cos2 α of each α, wherein, the reference difference t ' being represented by log (| tan (2 α) |) is similar to difference t; And
Step 7003, the value of sin2 α, the cos2 α of anisotropic each direction α of the footprint that tissue calculates and correspondence and reference difference t ' are to generate look-up table LUT, wherein, reference difference t ' be similar to difference t=log (| B|)-log (| A-C|).
In step 702, based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient
Figure GSB0000112650370000211
b=2 (u xv x+ u yv y) and
In step 704, based on oval coefficient A, B and C come calculated difference t=log (| B|)-log (| A-C|).
In step 706, relatively A-C, B and 0, to determine footprint anisotropic orientation value α in-scope AngleRg, obtain being similar to the reference difference t ' of difference t subsequently from LUT.
In step 708, from LUT, within the scope of AngleRg, obtain corresponding to the anisotropy reference direction value α ' of the footprint of reference difference t ' and corresponding sin2 α ' and cos2 α '.
In step 710, calculate (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to produce the first length and the second length.
In step 712, the first length and the second length are compared, using will length as main axis length, will shorter length as auxiliary shaft length.
In step 714, calculate main axis length and take 2 logarithms that are the end and take 2 logarithms that are the end to obtain auxiliary axle logarithm value to obtain main shaft logarithm value and to calculate auxiliary shaft length, that is, and LOD.
In step 716, by main shaft logarithm value, deduct auxiliary axle logarithm value and obtain logarithm ratio.This logarithm ratio equals ratio and take 2 logarithm value that are the end.
The 6th embodiment
Fig. 8 A show according to many aspects of the present invention for calculating the 6th embodiment of the method for anisotropic texture mapping parameter.Fig. 8 B shows in the 6th embodiment for constructing the method for LUT.
As shown in Figure 8 A, in step 800, structure look-up table LUT.As shown in Figure 8 B, this step is further comprising the steps:
Step 8001, for the footprint anisotropic orientation α in (0, π/8) scope, take special angle as step-length, calculates value and the corresponding sin α of each α, cos α, and the value of sin2 α and cos2 α is to obtain LUT 1, wherein, the reference difference t ' being represented by log (| tan (2 α) |) is similar to difference t;
Step 8002, for the footprint anisotropic orientation α in (π/8, π/4) scope, take special angle as step-length, calculates value and the corresponding sin α of each α, cos α, and the value of sin2 α and cos2 α is to obtain LUT 2, wherein, the reference difference t ' being represented by log (| cot (2 α) |) is similar to difference t; And
Step 8003, combined statement LUT 1and LUT 2, and the redundant columns of deleting sin2 α and cos2 α is to obtain LUT.
Table 3 shows the LUT in the 6th embodiment 1.Table 4 shows the LUT in the 6th embodiment 2.Table 5 shows and merges LUT 1and LUT 2the LUT obtaining.The sin2 α of each value of footprint anisotropic orientation α and correspondence thereof and the value of cos2 α are included in LUT indirectly, and the value of sin α and cos α is directly included in LUT.
Table 3 LUT 1(α ∈ (0, π/8))
Figure GSB0000112650370000221
Figure GSB0000112650370000231
Table 4 LUT 2(α ∈ (π/8, π/4))
Figure GSB0000112650370000232
Table 5 merges LUT 1and LUT 2the LUT obtaining
In step 802, based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient
Figure GSB0000112650370000241
b=2 (u xv x+ u yv y) and
Figure GSB0000112650370000242
In step 804, based on oval coefficient A, B and C calculate log (| A-C|) and log (| the difference t B|).Suppose the A=4 calculating in step 802, B=3, and C=2, difference t=log 2(| 4-2|)-log 2(| 3|)=log 22-log 23=-0.477121.
In step 806, relatively A-C, B and 0 are to determine footprint anisotropic orientation value α in-scope AngleRg.Compare A-C, B and 0, if 0 < B < A-C or A-C < B < 0, AngleRg is (0, π/8); If 0 < A-C < B or B < A-C < 0, AngleRg is (π/8, π/4); If 0 < A-C <-B or-B < A-C < 0, AngleRg is in (π/4,3 π/8); And if A-C <-B < 0 or 0 <-B < A-C, AngleRg is (3 π/8, pi/2).For A=4, B=3 and C=2,0 < A-C < B, so the anisotropy reference direction value α ' of footprint is in (π/8, π/4) scope.That is, the anisotropy reference direction value α ' ∈ (π/8, π/4) of footprint.
Subsequently, in LUT, obtain being similar to the reference difference t ' of difference t.This reference difference is corresponding to integer index (Inde α).Obtain thus the index corresponding with this reference difference t '.
For difference t=-0.477121, by binary chop, can obtain reference difference t ' and corresponding index.Fig. 9 shows binary chop structural map, can carry out binary chop according to Fig. 9.In an embodiment, the intermediate point between fitting nodes be independent point to reach the effect rounding up, altogether relatively just can determine index three times.In the present embodiment, reference difference t '=-4.60881 are corresponding to index 6.
In step 808, from LUT, within the scope of AngleRg, obtain corresponding to the footprint anisotropy reference direction value α ' of index 6 and corresponding sin2 α ' and cos2 α '.According to index and footprint anisotropy reference direction value α ' within the scope of AngleRg and corresponding sin2 α ' and the position relationship of cos2 α ', by index 6, search LUT and obtain footprint anisotropy reference direction value α ' and corresponding sin2 α ' and cos2 α '.In the present embodiment, π/60, α '=9, sin2 α '=0.809017 and cos2 α '=0.587785.
In step 810, calculate (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to obtain the first length and the second length.
In step 812, the first length and the second length are compared, using will length as main axis length, will shorter length as auxiliary shaft length.
In step 814, calculate main axis length and take 2 logarithms that are the end and take 2 logarithms that are the end to obtain auxiliary axle logarithm value to obtain main shaft logarithm value and to calculate auxiliary shaft length, that is, and LOD.
In step 816, by main shaft logarithm value, deduct auxiliary axle logarithm value and obtain logarithm ratio.This logarithm ratio equals ratio and take 2 logarithm value that are the end.
Figure 10 show according to an aspect of the present invention for calculating the schematic diagram of the device of texture mapping parameters.This device comprises:
Oval coefficient calculation unit 1001 is for based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient;
Difference computational unit 1003 is for based on oval coefficient calculations difference t;
Comparing unit 1005 is for determining the scope AngleRg at footprint direction value α place;
Reference difference obtains unit 1007 for obtaining the reference difference t ' that is similar to difference t, and wherein, this difference t is from difference computational unit 1003;
LUT searches unit 1009 for search the footprint reference direction value α ' corresponding to reference difference t ' within the scope of LUT AngleRg; And
Parameter calculation unit 1011 is for calculating parametric texture.
In another embodiment of the present invention, parameter calculation unit 1011 comprises: length computation unit, for calculating (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to obtain the first length and the second length; And discriminating unit, for using the shorter one in main shaft anisotropic texture mapping parameter and the first length and the second length compared with elder of the first length and the second length as auxiliary axle anisotropic texture mapping parameter.
In another embodiment of the present invention, for calculating the device of texture mapping parameters, further comprise LUT tectonic element, be used for (0, pi/2) the footprint anisotropic orientation α in scope, take special angle as step-length, and structure comprises the LUT of the value of each α value and corresponding sin2 α, cos2 α.
In another embodiment of the present invention, for calculating the device of texture mapping parameters, further comprise LUT tectonic element, be used for constructing LUT look-up table, wherein, for the footprint anisotropic orientation α in (0, π/8) scope, LUT comprises take each α value that special angle is step-length and corresponding sin2 α, the value of cos2 α, wherein, reference difference t ' is represented by log (| tan (2 α) |); For (π/8, π/4) the footprint anisotropic orientation α in scope, LUT comprises take each α value that above-mentioned special angle is step-length and corresponding sin2 α, the value of cos2 α, wherein, and the LUT that reference difference t ' is represented by log (| cot (2 α) |).
In another embodiment of the present invention, parameter calculation unit 1011 is for calculating the LOD of anisotropic texture mapping parameter.
In another embodiment of the present invention, parameter calculation unit 1011 is for calculating logarithm ratio (logratio) by the first length and the second length.
Obviously, the present invention all can apply in anisotropic filtering and isotropy filtration.Difference is, the length/ratio/direction of the auxiliary axle of anisotropic filtering needs, and isotropy is filtered the length that only needs main shaft.
To those skilled in the art, if oval defined matrix be M = T &prime; * T = Ux 2 + Vx 2 UxUy + VxVy UxUy + VxVy Uy 2 + Vy 2 , That is, wherein, oval Coefficient Definition is A=Ux 2+ Vx 2, B=2 (UxUy+VxVy), C=Uy 2+ Vy 2.By increasing the 3rd variable w, A=Ux can be set 2+ Vx 2+ Wx 2, B=2 (UxUy+VxVy+WxWy), C=Uy 2+ Vy 2+ Wy 2, said method also can be applied to 3D texture.
In addition, various illustrative logical blocks, process flow diagram, window and the step of describing together with embodiment disclosed herein can realize or carry out in hardware or software, and this hardware or software has application-specific IC (ASIC), programmable logic device, discrete gate or transistor logic, resemble register and the such discrete hardware component of FIFO, carry out processor, any conventional programmable software and processor or its combination in any of firmware instructions.Can hardware description language (HDL) instruction based on being stored on computer-readable medium manufacture this hardware element.This HDL instruction can be for mask works etc., and finally for the manufacture of technique to manufacture the hardware unit (for example, such as processor) that can many aspects according to the present invention carrys out work.Preferably, this processor is microprocessor, but alternatively, this processor can be conventional processors, controller, microcontroller or state machine.Software can be stored in the storage medium of the arbitrary form in RAM storer, flash memory, ROM storer, register, hard disk, removable dish or other this area.
Above-mentioned is only the preferred embodiments of the present invention, is not limited to the present invention.For a person skilled in the art, the present invention can have various changes and replacement.All modifications in the present invention spirit and principle, replacement, improvement are all in the coverage of the appended claim of the present invention.

Claims (29)

1. for determine a method for texture mapping parameters footprint of the projection in texture with define and represent pixel at image processor, wherein, it is oval that the corresponding footprint in texture space is approximately, and comprising:
Based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient A = u x 2 + u y 2 , B=2(u xv x+u yv y), C = v x 2 + v y 2 ;
Based on described oval coefficient A, B, C calculate log (| A-C|) and log (| the difference t B|);
Compare A-C, B and 0 to determine the scope AngleRg at footprint anisotropic orientation value α place, and obtain the approximate reference difference t ' of difference t; And
From LUT, in AngleRg, obtain the footprint anisotropy reference direction value α ' corresponding to reference difference t '.
2. method according to claim 1, wherein, described oval coefficient is defined as A=Ux 2+ Vx 2, B=2 (UxUy+VxVy), C=Uy 2+ Vy 2.
3. method according to claim 1, further comprises:
Based on A, B, C, sin2 α ' and cos2 α ', calculate the auxiliary shaft length of main axis length and the anisotropic texture mapping parameter of anisotropic texture mapping parameter.
4. method according to claim 3, wherein, described a pair of specific local derviation vector (u x, v x) and (u y, v y) partial derivative for y that is respectively texture coordinate u and v for the partial derivative of x and texture coordinate u and v.
5. method according to claim 3, wherein, if 0 < B < A-C or A-C < B < 0, scope AngleRg is (0, π/8); If 0 < A-C < B or B < A-C < 0, scope AngleRg is (π/8, π/4); If 0 < A-C <-B or-B < A-C < 0, scope AngleRg is (π/4,3 π/8); And if A-C <-B < 0 or 0 <-B < A-C, scope AngleRg is (3 π/8, pi/2).
6. method according to claim 3, wherein, based on A, B, C, sin2 α ' and cos2 α ', calculate the main axis length of described anisotropic texture mapping parameter and the auxiliary shaft length of anisotropic texture mapping parameter comprises:
Calculate (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to obtain the first length and the second length; And
Using in described the first length and described the second length compared with elder as main shaft anisotropic texture mapping parameter, and using the shorter one in described the first length and described the second length as auxiliary axle anisotropic texture mapping parameter.
7. method according to claim 3, further comprises the step of constructing described LUT.
8. according to the method described in any one in claim 3 to 7, wherein, described LUT comprises described footprint anisotropic orientation value α ∈ (0, pi/2) in scope, have the footprint anisotropic orientation value α of particular step size each value, the corresponding value of sin2 α, the value of cos2 α and reference difference t ', wherein, reference difference t ' is similar to described difference t.
9. method according to claim 8, wherein, if t=log (| A-C|)-log (| B|), t ' represents log (| cot (2 α) |); If t=log (| B|)-log (| A-C|), t ' represents log (| tan (2 α) |).
10. according to the method described in any one in claim 3 to 7, wherein, described LUT comprises (0, π/8) in scope, have the footprint anisotropic orientation value α of particular step size each value, the corresponding value of sin2 α, the value of cos2 α and reference difference t ', wherein, described reference difference t ' is represented by log (| tan (2 α) |); Also comprise (π/8, π/4) in scope, have the footprint anisotropic orientation value α of described particular step size each value, the corresponding value of sin2 α, the value of cos2 α and reference difference t ', wherein, described reference difference t ' is represented by log (| cot (2 α) |).
11. according to the method described in any one in claim 3 to 7, further comprises the step of the level of detail that calculates anisotropic texture mapping parameter.
12. according to the method described in any one in claim 3 to 7, further comprises the step of calculating logarithm ratio by the first length and the second length.
13. methods according to claim 7, wherein, the step of the described LUT of described structure comprises:
For (0, footprint anisotropic orientation value α pi/2) in scope, with particular step size, calculate each value and the sin2 α of correspondence and the value of cos2 α of footprint anisotropic orientation value α, wherein, the described reference difference t ' being represented by log (| cot (2 α) |) be similar to difference t=log (| A-C|)-log (| B|); And
The sin2 α of each value of the described footprint anisotropic orientation value α that tissue calculates and correspondence and the value of cos2 α and described reference difference t ' are to produce LUT.
14. methods according to claim 7, wherein, the step of the described LUT of described structure comprises:
For (0, footprint anisotropic orientation value α pi/2) in scope, with particular step size, calculate each value and the sin2 α of correspondence and the value of cos2 α of footprint anisotropic orientation value α, wherein, the described reference difference t ' being represented by log (| tan (2 α) |) be similar to difference t=log (| B|)-log (| A-C|); And
The sin2 α of each value of the described footprint anisotropic orientation value α that tissue calculates and correspondence and the value of cos2 α and described reference difference t ' are to produce LUT.
15. methods according to claim 7, wherein, the step of the described LUT of described structure comprises:
For (0, footprint anisotropic orientation value α π/8) in scope, with particular step size, calculate the value of each value of footprint anisotropic orientation value α and sin α, cos α, sin2 α and the cos2 α of correspondence to construct the first look-up table, wherein, described reference difference t ' is represented by log (| tan (2 α) |);
For (π/8, footprint anisotropic orientation value α π/4) in scope, with particular step size, calculate the value of each value of footprint anisotropic orientation α and sin α, cos α, sin2 α and the cos2 α of correspondence with structure second look-up table, wherein, described reference difference t ' is represented by log (| cot (2 α) |); And
Merge described the first look-up table and second look-up table, and delete redundant columns sin2 α and cos2 α to obtain described LUT.
16. methods according to claim 10 wherein, directly comprise the value of sin α and cos α in described LUT, can obtain from described LUT middle ground value and the sin2 α of correspondence and the value of cos2 α of described each footprint anisotropic orientation α simultaneously.
17. methods according to claim 10, wherein, if described scope AngleRg is (0, π/8), obtain be similar to difference t=log (| B|)-log (| reference difference t ' A-C|); If described scope AngleRg is (π/8, π/4), obtain be similar to difference t=log (| A-C|)-log (| reference difference t ' B|)
18. methods according to claim 10, wherein, for the described footprint anisotropic orientation value α in (π/4, pi/2) scope, the value of sin2 α and cos2 α can be by being used trigonometric function conversion formula to obtain from described LUT.
19. methods according to claim 17, wherein, are used binary chop from described LUT, to obtain the reference difference t ' that is similar to described difference t.
20. methods according to claim 19, wherein, described reference difference t ' is corresponding to index, and described index is for obtaining described footprint anisotropy reference direction value α ' and corresponding sin2 α ' and cos2 α ' in scope AngleRg from described LUT.
21. 1 kinds for determining that texture mapping parameters is to define the device of footprint, and wherein, it is oval that the corresponding footprint in texture space is approximately, and comprising:
Oval coefficient calculation unit, for based on a pair of specific local derviation vector (u x, v x) and (u y, v y) calculate oval coefficient b=2 (u xv x+ u yv y),
Figure FSB0000112650360000052
Difference computational unit, for based on described oval coefficient A, B, C calculate log (| A-C|) and log (| the difference t B|);
Comparing unit, for comparing A-C, B and 0 to determine footprint anisotropic orientation value α in-scope AngleRg;
Reference difference obtains unit, for obtaining being similar to the reference difference t ' of described difference t; And
LUT searches unit, for searching the footprint anisotropy reference direction value α ' corresponding to described reference difference t ' in the described scope AngleRg from described LUT.
22. devices according to claim 21, wherein, described oval coefficient is defined as A=Ux 2+ Vx 2, B=2 (UxUy+VxVy), C=Uy 2+ Vy 2.
23. devices according to claim 21, further comprise:
Parameter calculation unit, for calculating the auxiliary shaft length of main axis length and the anisotropic texture mapping parameter of anisotropic texture mapping parameter based on A, B, C, sin2 α ' and cos2 α '.
24. devices according to claim 23, further comprise LUT tectonic element, be used for (0, pi/2) in scope, have the described footprint anisotropic orientation value of particular step size, structure comprises the described LUT of each value of described footprint anisotropic orientation value α and the value of corresponding sin2 α, cos2 α.
25. devices according to claim 23, further comprise LUT tectonic element, be used for constructing LUT, described LUT is to (0, π/8) in scope, there is the described footprint anisotropic orientation value of particular step size, comprise each value of described footprint anisotropic orientation value α and corresponding sin2 α, the value of cos2 α, wherein, described reference difference t ' is represented by log (| tan (2 α) |); And to (π/8, π/4) in scope, there is the described footprint anisotropic orientation value of particular step size, comprise each value of described footprint anisotropic orientation value α and corresponding sin2 α, the value of cos2 α, wherein, described reference difference t ' is represented by log (| cot (2 α) |).
26. devices according to claim 23, wherein, described parameter calculation unit comprises:
Length computation unit, for calculating (A+C)+[(A-C) cos (2 α ')+B sin (2 α ')] and (A+C)-[(A-C) cos (2 α ')+B sin (2 α ')] to obtain the first length and the second length; And
Discriminating unit, for using the shorter one in described main shaft anisotropic texture mapping parameter and described the first length and described the second length compared with elder of described the first length and described the second length as described auxiliary axle anisotropic texture mapping parameter.
27. devices according to claim 23, wherein, described parameter calculation unit is also for calculating the level of detail of texture mapping parameters.
28. devices according to claim 26, wherein, described parameter calculation unit is also for calculating logarithm ratio by described the first length and described the second length.
29. 1 kinds for calculating the method for texture mapping parameters footprint of the projection in texture with define and represent pixel at image processor, wherein, it is oval that the corresponding footprint in texture space is approximately, and comprising:
Based on a pair of specific local derviation vector (u x, v x, w x) and (u x, v x, w x) calculate oval coefficient A=Ux 2+ Vx 2+ Wx 2, B=2 (UxUy+VxVy+WxWy), C=Uy 2+ Vy 2+ Wy 2;
Based on described oval coefficient A, B and C calculate log (| A-C|) and log (| the difference t B|);
Compare A-C, B and 0 to determine footprint anisotropic orientation value α in-scope AngleRg, and obtain being similar to the reference difference t ' of described difference t; And
In the AngleRg of scope described in LUT, obtain the footprint anisotropy reference direction value α ' corresponding to described reference difference t '.
CN200810207277.6A 2008-12-18 2008-12-18 Method and device for determining texture mapping parameters to define and represent pixel projection footprints Active CN101751687B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN200810207277.6A CN101751687B (en) 2008-12-18 2008-12-18 Method and device for determining texture mapping parameters to define and represent pixel projection footprints
PCT/CN2009/075707 WO2010069269A1 (en) 2008-12-18 2009-12-18 A method of determining texture map parameters to define a footprint in a graphics processor and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810207277.6A CN101751687B (en) 2008-12-18 2008-12-18 Method and device for determining texture mapping parameters to define and represent pixel projection footprints

Publications (2)

Publication Number Publication Date
CN101751687A CN101751687A (en) 2010-06-23
CN101751687B true CN101751687B (en) 2014-03-05

Family

ID=42268334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810207277.6A Active CN101751687B (en) 2008-12-18 2008-12-18 Method and device for determining texture mapping parameters to define and represent pixel projection footprints

Country Status (2)

Country Link
CN (1) CN101751687B (en)
WO (1) WO2010069269A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11158110B1 (en) * 2021-01-06 2021-10-26 Arm Limited Graphics texture mapping
CN116168138A (en) * 2023-02-21 2023-05-26 格兰菲智能科技有限公司 Level of detail determination method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1395222A (en) * 2001-06-29 2003-02-05 三星电子株式会社 Representation and diawing method of three-D target and method for imaging movable three-D target
CN1467687A (en) * 2002-06-20 2004-01-14 Systems and methods for providing controllable texture sampling
CN101046891A (en) * 2006-03-29 2007-10-03 株式会社东芝 Texture mapping apparatus and method
US7339594B1 (en) * 2005-03-01 2008-03-04 Nvidia Corporation Optimized anisotropic texture sampling
US7369136B1 (en) * 2004-12-17 2008-05-06 Nvidia Corporation Computing anisotropic texture mapping parameters

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1395222A (en) * 2001-06-29 2003-02-05 三星电子株式会社 Representation and diawing method of three-D target and method for imaging movable three-D target
CN1467687A (en) * 2002-06-20 2004-01-14 Systems and methods for providing controllable texture sampling
US7369136B1 (en) * 2004-12-17 2008-05-06 Nvidia Corporation Computing anisotropic texture mapping parameters
US7339594B1 (en) * 2005-03-01 2008-03-04 Nvidia Corporation Optimized anisotropic texture sampling
CN101046891A (en) * 2006-03-29 2007-10-03 株式会社东芝 Texture mapping apparatus and method

Also Published As

Publication number Publication date
WO2010069269A1 (en) 2010-06-24
CN101751687A (en) 2010-06-23

Similar Documents

Publication Publication Date Title
Lagae et al. A survey of procedural noise functions
Liu et al. Exemplar-based image inpainting using multiscale graph cuts
CN102016928B (en) Method, apparatus, and computer program product for improved graphics performance
CN102693527B (en) Method and apparatus for performing a blur rendering process on an image
US10019817B2 (en) Example-based edge-aware directional texture painting
CN103907109B (en) Fast numerical for image procossing purpose wave filter application convolution is approached
US20150178961A1 (en) System, method, and computer program product for angular subdivision of quadratic bezier curves
US20100097383A1 (en) Graphics processing systems
US20200184687A1 (en) Gpu calculation of signed distance fields
US10540789B2 (en) Line stylization through graphics processor unit (GPU) textures
CN103810756B (en) The method for drafting of self adaptive Loop subdivision curved surface based on irregular area
US20090309877A1 (en) Soft shadow rendering
US10475229B2 (en) Information processing apparatus and information processing method
Gao et al. Feature-preserving surface mesh smoothing via suboptimal Delaunay triangulation
Molnár et al. Quadratic transformation for planar mapping of implicit surfaces
CN101383044A (en) Spatial diffusion in images
US20120038643A1 (en) System, method, and computer program product for deterministically simulating light transport
Dimitrijević et al. Comparison of spherical cube map projections used in planet-sized terrain rendering
CN101751687B (en) Method and device for determining texture mapping parameters to define and represent pixel projection footprints
Ujaldón et al. On the computation of the Circle Hough Transform by a GPU rasterizer
US20230057658A1 (en) Anisotropic texture filtering by combining isotropic filtering results at each of a plurality of sampling points
Soldea et al. Recursive computation of moments of 2D objects represented by elliptic Fourier descriptors
Hu et al. CVT-based 3D image segmentation and quality improvement of tetrahedral/hexahedral meshes using anisotropic Giaquinta-Hildebrandt operator
Ye et al. A sparsity-promoting image decomposition model for depth recovery
US20080238921A1 (en) Realistic transformation of 3D lighting models

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant