   Render in screen coordinates
  I am so close.1) I make a view matrix = real view matrix, but with 0 translation.2) I get a position in screen coordinates, from a 3D position, with D3DXVec3Project.3) I set the view matrix to identity4) I create a 2D ortho matrix usingD3DXMatrixOrthoOffCenterLH(&projection,0.0f,static_cast<float>(viewport.Width),0.0f,static_cast<float>(viewport.Height),0.0f,1.0f);And I get an image that is billboarded in 2D screen coordinates. Almost....It stays where it should as I turn left to right, but when I rotate the camera up it also move up. When I rotate the camera down, it also moves down.I know my problem is the projection top and bottom are opposites!However, if I switch the top and bottom params, the image no longer gets rendered.I have a feeling this turns the quads inside out, and somehow DirectX now believes my triangles to be drawn counter clockwise instead of clockwise???I can see in pix that-------|\    || \   ||  \  ||   \ |-------became-------|    /||   / ||  /  || /   |-------Is that to be expected? Do I need to change a state in the shader to handle this problem when trying to draw using screen coordinates?What state handles that? What do I set it to?   
  Your current projection matrix has (0, height) in the top left corner and (width, 0) in the bottom right - so +Y is down the way. You should swap the parameters as you said.As for why it's no longer rendering; your triangles must be specified in counter-clockwise order - which is the default back-facing setting. You want to make sure that all of your vertices are specified in clockwise order.   ;Quote:Original post by Evil SteveYour current projection matrix has (0, height) in the top left corner and (width, 0) in the bottom right - so +Y is down the way. You should swap the parameters as you said.As for why it's no longer rendering; your triangles must be specified in counter-clockwise order - which is the default back-facing setting. You want to make sure that all of your vertices are specified in clockwise order.That's just it.I would expect them to have to be specified in clockwise order, but it didn't render. When I specified them in counter-clockwise order it did.This results in the image showing up:It has counter clockwise vertices!   queryPositions.push_back(Position( -m_querySize / 2.0f, -m_querySize / 2.0f, 0.0f));   queryPositions.push_back(Position(  m_querySize / 2.0f, -m_querySize / 2.0f, 0.0f));   queryPositions.push_back(Position( -m_querySize / 2.0f,  m_querySize / 2.0f, 0.0f));   queryPositions.push_back(Position(  m_querySize / 2.0f,  m_querySize / 2.0f, 0.0f));// SNIP...D3DXMatrixOrthoOffCenterLH(&newProjection,  0.0f,  static_cast<float>(viewport.Width),  static_cast<float>(viewport.Height),  0.0f,  0.0f,  1.0f);This results in the image _not_ showing up:It has clockwise vertices!   queryPositions.push_back(Position( -m_querySize / 2.0f, -m_querySize / 2.0f, 0.0f));   queryPositions.push_back(Position( -m_querySize / 2.0f,  m_querySize / 2.0f, 0.0f));   queryPositions.push_back(Position(  m_querySize / 2.0f, -m_querySize / 2.0f, 0.0f));   queryPositions.push_back(Position(  m_querySize / 2.0f,  m_querySize / 2.0f, 0.0f));// SNIP...D3DXMatrixOrthoOffCenterLH(&newProjection,  0.0f,  static_cast<float>(viewport.Width),  static_cast<float>(viewport.Height),  0.0f,  0.0f,  1.0f);The first way works, which makes me happy. I even think I understand why. It just goes against everyone's advise :/So, I am now believing that backface culling occurs after the shaders, and that the projection matrix into screen space reverses the order of vertices in my vertex shader, because it effectivly rotated the quad 180 degrees about the x axis.   