Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#ActualRobMaddison

Posted 20 January 2013 - 02:22 PM

Hi

When you want to show something like a health bar, a map, score or number of lives etc, I thought you might have to setup a specific view projection matrix, etc, but I just 'accidentally' did it by creating the graphic bounds using interpolated view projected vertices, e.g., the whole screen would be x and y -1,-1 to 1,1 respectively. In the vertex shader I just don't use a matrix to transform it and it works.

Is this how it's normally done anyway? Seems it would be quicker than doing it with matrices

#1RobMaddison

Posted 20 January 2013 - 02:21 PM

Hi

When you want to show something like a health bar, a map, score or number of lives etc, I thought you might have to setup an orthographic projection, etc, but I just 'accidentally' did it by creating the graphic bounds using interpolated view projected vertices, e.g., the whole screen would be x and y -1,-1 to 1,1 respectively. In the vertex shader I just don't use a matrix to transform it and it works.

Is this how it's normally done anyway? Seems it would be quicker than doing it with matrices

PARTNERS