mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] egl: make scale algorithms toggleable
The $escape+S keybinding now cycles through the available scale algorithms. This allows the user to switch between algorithms if the automatic detection turns out to be problematic. The algorithms are renumbered so that 0 can be LG_SCALE_AUTO.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#version 300 es
|
||||
|
||||
#define LG_SCALE_NEAREST 0
|
||||
#define LG_SCALE_LINEAR 1
|
||||
#define EGL_SCALE_AUTO 0
|
||||
#define EGL_SCALE_NEAREST 1
|
||||
#define EGL_SCALE_LINEAR 2
|
||||
#define EGL_SCALE_MAX 3
|
||||
|
||||
in highp vec2 uv;
|
||||
out highp vec4 color;
|
||||
@@ -41,11 +43,11 @@ void main()
|
||||
|
||||
switch (scaleAlgo)
|
||||
{
|
||||
case LG_SCALE_NEAREST:
|
||||
case EGL_SCALE_NEAREST:
|
||||
color = texelFetch(sampler1, ivec2(ruv * size), 0);
|
||||
break;
|
||||
|
||||
case LG_SCALE_LINEAR:
|
||||
case EGL_SCALE_LINEAR:
|
||||
color = texture(sampler1, ruv);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user