mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 07:39:56 -06:00
Fix OpenGL display scaling on high DPI (#1011)
* Fix OpenGL display scaling on high DPI * Scale the OSD too * Fix indent
This commit is contained in:

committed by
GitHub

parent
532dc57025
commit
97643586fa
@ -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;
|
||||
|
Reference in New Issue
Block a user