   Full screen quad question
  Hello, I want to render a fullscreen quad, and my resolution is 640x480. I want to use transformed vertices (you know, those with an rhw component). My question is, what coordinates should I place the 4 verts at?(0,0) is the first corner. But the second one, is it (640,480) or (639,479)? I have a texture that's 640x480 pixels wide, and I want to render it without getting it to look wierd. If I use (640,480) as the second corners coordinate, I get an ugly line across everything (it looks like the texture is stretched in some really ugly way), and if I use (639, 479), I get borders outside the image in my Clear() color (in this case blue). So what should I be using?Anyone?(DX9, both managed and unmanaged, april 06 sdk, vc++/vc# 8.0, XP)   
  Maybe offset by 0.5 in either direction due to the way that D3D samples texels?http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Directly_Mapping_Texels_to_Pixels.aspThere's one link...there are a few others, basicly there is a difference of 0.5 in the way texels are mapped to pixels, and you need to account for it.I've been messing with this issue for the last few days, in terms of post-processing stuff...so I feel your pain. - Dan   ;  Hmm, I don't know why you get a line. You may try calling:lpDevice->SetRenderState ( D3DRS_LASTPIXEL, FALSE );(or how is it called...). This controls whether the last pixel in each line is to be drawn. I've never seen any difference between these methods, but hope it helps. I'm setting this flag to FALSE and my full-screen quad works all right.Also I would suggest using sprites. They came in some pretty new SDK (I'm using June2005). They are used to draw 2d objects quickly and efficiently (at least it's what the Microsoft say). However their usage requires some thinking: they need some transformation matrices...   ;  Make it -0.5f,-0.5f for the top left corner and 639.5f,479.5f for the bottom right corner. Adjust the texture coordinates to the values 0,0 for top left, and 640/texture_width,480/texture_height for the bottom right corner.   ;  Thanks alot, seems to be working now (after subtracting 0.5 from everything it looks like it should).Rating++ to all of you   