aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-05-17 22:50:41 +0200
committerArisotura <thetotalworm@gmail.com>2019-05-17 22:50:41 +0200
commitde287825eec01aaa5e8ab925171cd75d86a23cb4 (patch)
tree5521ef9a7c4fe722823224a937097f672d70f6c0 /src/libui_sdl
parent26f997172b0765cd807ebfb7c20993276fe871a4 (diff)
start work on display capture
also fix a bug in the compositing shader
Diffstat (limited to 'src/libui_sdl')
-rw-r--r--src/libui_sdl/main_shaders.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libui_sdl/main_shaders.h b/src/libui_sdl/main_shaders.h
index 9ed3cc0..5c9095e 100644
--- a/src/libui_sdl/main_shaders.h
+++ b/src/libui_sdl/main_shaders.h
@@ -65,7 +65,7 @@ out vec4 oColor;
void main()
{
ivec4 pixel = ivec4(texelFetch(ScreenTex, ivec2(fTexcoord), 0));
-
+ivec4 zog=pixel;
// bit0-13: BLDCNT
// bit14-15: DISPCNT display mode
// bit16-20: EVA
@@ -86,7 +86,7 @@ void main()
int winmask = top.b >> 7;
- if ((top.a & 0x40) != 0)
+ if ((top.a & 0xC0) == 0x40)
{
float xpos = top.r + fract(fTexcoord.x);
float ypos = mod(fTexcoord.y, 768);
@@ -96,7 +96,7 @@ void main()
if (_3dpix.a > 0) { top = _3dpix; top.a |= 0x40; bot = mid; }
else top = mid;
}
- else if ((mid.a & 0x40) != 0)
+ else if ((mid.a & 0xC0) == 0x40)
{
float xpos = mid.r + fract(fTexcoord.x);
float ypos = mod(fTexcoord.y, 768);