fix text vertex shader coordinate mapping
This commit is contained in:
parent
eb72558cf7
commit
4ef71dae79
@ -8,9 +8,9 @@ varying vec2 texture_coord_v;
|
|||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
// Map coordinates such that:
|
// Map coordinates such that:
|
||||||
// (-0.5 .. screen_size.x-0.5) => (-1.0 .. 1.0)
|
// (0 .. screen_size.x) => (-1.0 .. 1.0)
|
||||||
gl_Position = vec4(2.0 * (position.x + coords.x + 0.5) / screen_size.x - 1.0,
|
gl_Position = vec4(2.0 * (position.x + coords.x) / screen_size.x - 1.0,
|
||||||
2.0 * (position.y + coords.y + 0.5) / screen_size.y - 1.0,
|
2.0 * (position.y + coords.y) / screen_size.y - 1.0,
|
||||||
0, 1);
|
0, 1);
|
||||||
texture_coord_v = coords.zw;
|
texture_coord_v = coords.zw;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user