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)

原文地址:https://www.cnblogs.com/cloudseawang/p/638127.html