Enable hardware frame buffer texture scaling

This commit is contained in:
gdkchan 2018-02-28 23:37:40 -03:00
parent eacd432387
commit 5d8a615c21
5 changed files with 75 additions and 12 deletions

View file

@ -2,8 +2,9 @@
precision highp float;
uniform vec2 window_size;
uniform mat2 transform;
uniform vec2 window_size;
uniform vec2 offset;
layout(location = 0) in vec2 in_position;
layout(location = 1) in vec2 in_tex_coord;
@ -22,5 +23,6 @@ vec2 get_scale_ratio(void) {
void main(void) {
tex_coord = in_tex_coord;
gl_Position = vec4((transform * in_position) * get_scale_ratio(), 0, 1);
vec2 t_pos = (transform * in_position) + offset;
gl_Position = vec4(t_pos * get_scale_ratio(), 0, 1);
}