diff options
Diffstat (limited to 'src/frontend/qt_sdl/main_shaders.h')
-rw-r--r-- | src/frontend/qt_sdl/main_shaders.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/frontend/qt_sdl/main_shaders.h b/src/frontend/qt_sdl/main_shaders.h index c55f79e..da5a22a 100644 --- a/src/frontend/qt_sdl/main_shaders.h +++ b/src/frontend/qt_sdl/main_shaders.h @@ -23,6 +23,7 @@ const char* kScreenVS = R"(#version 140 uniform vec2 uScreenSize; uniform mat2x3 uTransform; +uniform float uScaleFactor; in vec2 vPosition; in vec2 vTexcoord; @@ -33,9 +34,9 @@ void main() { vec4 fpos; - fpos.xy = vec3(vPosition, 1.0) * uTransform; + fpos.xy = vec3(vPosition, 1.0) * uTransform * uScaleFactor; - fpos.xy = ((fpos.xy * 2.0) / uScreenSize) - 1.0; + fpos.xy = ((fpos.xy * 2.0) / (uScreenSize * uScaleFactor)) - 1.0; fpos.y *= -1; fpos.z = 0.0; fpos.w = 1.0; |