difference between texRECT and tex2D

tex2D: texcoords in [0,1]
texRECT: texcoords in [0,texwidth], pixel-centered.
Example: Assuming viewport = screensize, standard orthogonal mapping:
Rendering full-screen Quad will yield the following texRECT coords:
(0.5,0.5) ....... (screenX-0.5, 0.5)
(0.5,screenY-0.5) ...... (screenX-0.5, screenY-0.5)

你可能感兴趣的:(diff)