This topic is now archived and is closed to further replies.

Screen Space and World Space

This topic is 5074 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You have to create a separate vertex type, which actually extends into 4D. Mine looks like this:

struct VERTEX2D
D3DXVECTOR4 position;
float tu, tv;

and the FVF is:


You can then just use four of these vertices and map your HUD texture over them.

Share this post

Link to post
Share on other sites

The fourth component is not a "4th dimension" it is the rhw. To make things simple, it signals that everything you give it is post-transformation. It will not do the calculations for lighting or vertex position. The xyz will be in pure pixels. Just set the rhw to 1 to keep it from doing any weird scaling.

Share this post

Link to post
Share on other sites