aboutsummaryrefslogtreecommitdiff
path: root/src/GPU_OpenGL_shaders.h
diff options
context:
space:
mode:
authorWaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com>2020-12-19 17:43:53 +0000
committerGitHub <noreply@github.com>2020-12-19 17:43:53 +0000
commitdf190b04000a8a3c5052de3fd695f6c26892f353 (patch)
tree85c53cda9b5e6c73dcfb82f97272e509f023788b /src/GPU_OpenGL_shaders.h
parentd6cade25f4ac6b2ebac9d4830ab7b10294bc4c89 (diff)
parent659dc58d4d8290d8ef1930d9f21007c0ec4c3739 (diff)
Merge branch 'master' into feature/zip-support
Diffstat (limited to 'src/GPU_OpenGL_shaders.h')
-rw-r--r--src/GPU_OpenGL_shaders.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/GPU_OpenGL_shaders.h b/src/GPU_OpenGL_shaders.h
index 20ac767..03ddb7a 100644
--- a/src/GPU_OpenGL_shaders.h
+++ b/src/GPU_OpenGL_shaders.h
@@ -40,6 +40,7 @@ void main()
const char* kCompositorFS_Nearest = R"(#version 140
uniform uint u3DScale;
+uniform int u3DXPos;
uniform usampler2D ScreenTex;
uniform sampler2D _3DTex;
@@ -52,6 +53,8 @@ void main()
{
ivec4 pixel = ivec4(texelFetch(ScreenTex, ivec2(fTexcoord), 0));
+ float _3dxpos = float(u3DXPos);
+
ivec4 mbright = ivec4(texelFetch(ScreenTex, ivec2(256*3, int(fTexcoord.y)), 0));
int dispmode = mbright.b & 0x3;
@@ -68,7 +71,7 @@ void main()
{
// 3D on top, blending
- float xpos = val3.r + fract(fTexcoord.x);
+ float xpos = fTexcoord.x + _3dxpos;
float ypos = mod(fTexcoord.y, 192);
ivec4 _3dpix = ivec4(texelFetch(_3DTex, ivec2(vec2(xpos, ypos)*u3DScale), 0).bgra
* vec4(63,63,63,31));
@@ -89,7 +92,7 @@ void main()
{
// 3D on bottom, blending
- float xpos = val3.r + fract(fTexcoord.x);
+ float xpos = fTexcoord.x + _3dxpos;
float ypos = mod(fTexcoord.y, 192);
ivec4 _3dpix = ivec4(texelFetch(_3DTex, ivec2(vec2(xpos, ypos)*u3DScale), 0).bgra
* vec4(63,63,63,31));
@@ -109,7 +112,7 @@ void main()
{
// 3D on top, normal/fade
- float xpos = val3.r + fract(fTexcoord.x);
+ float xpos = fTexcoord.x + _3dxpos;
float ypos = mod(fTexcoord.y, 192);
ivec4 _3dpix = ivec4(texelFetch(_3DTex, ivec2(vec2(xpos, ypos)*u3DScale), 0).bgra
* vec4(63,63,63,31));