Jump to content
  • Advertisement


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


Screen Space and World Space

This topic is 5382 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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!