diff options
author | Arisotura <thetotalworm@gmail.com> | 2019-05-16 22:04:27 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2019-05-16 22:04:27 +0200 |
commit | 72920bb763c73a761992391568ad418750070c7c (patch) | |
tree | ef9fdda89a24f8ab1d8a0e27b43f88daf6086700 /src | |
parent | c1746f0c6082afd64834e89ce92591743f238f66 (diff) |
fix 3D on bottom screen
Diffstat (limited to 'src')
-rw-r--r-- | src/libui_sdl/main_shaders.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libui_sdl/main_shaders.h b/src/libui_sdl/main_shaders.h index b602013..85ff794 100644 --- a/src/libui_sdl/main_shaders.h +++ b/src/libui_sdl/main_shaders.h @@ -89,7 +89,8 @@ void main() if ((top.a & 0x40) != 0) { float xpos = top.r + fract(fTexcoord.x); - uvec4 _3dpix = uvec4(texelFetch(_3DTex, ivec2(vec2(xpos, fTexcoord.y)*u3DScale), 0).bgra + float ypos = mod(fTexcoord.y, 768); + uvec4 _3dpix = uvec4(texelFetch(_3DTex, ivec2(vec2(xpos, ypos)*u3DScale), 0).bgra * vec4(63,63,63,31)); if (_3dpix.a > 0) { top = _3dpix; top.a |= 0x40; bot = mid; } @@ -98,7 +99,8 @@ void main() else if ((mid.a & 0x40) != 0) { float xpos = mid.r + fract(fTexcoord.x); - uvec4 _3dpix = uvec4(texelFetch(_3DTex, ivec2(vec2(xpos, fTexcoord.y)*u3DScale), 0).bgra + float ypos = mod(fTexcoord.y, 768); + uvec4 _3dpix = uvec4(texelFetch(_3DTex, ivec2(vec2(xpos, ypos)*u3DScale), 0).bgra * vec4(63,63,63,31)); if (_3dpix.a > 0) { bot = _3dpix; bot.a |= 0x40; } |