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
Show differencesHistory of post edits
#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
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