mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 07:10:00 -06:00
make it more functional and betterer
atleast now it's not worse than what it was before, so we can start building real shit
This commit is contained in:
@ -51,6 +51,8 @@ bool Init()
|
||||
|
||||
for (int i = 0; i < 1; i++)
|
||||
{
|
||||
GLint uni_id;
|
||||
|
||||
glBindAttribLocation(CompShader[i][2], 0, "vPosition");
|
||||
glBindFragDataLocation(CompShader[i][2], 0, "oColor");
|
||||
|
||||
@ -58,6 +60,12 @@ bool Init()
|
||||
return false;
|
||||
|
||||
CompScaleLoc[i] = glGetUniformLocation(CompShader[i][2], "u3DScale");
|
||||
|
||||
glUseProgram(CompShader[i][2]);
|
||||
uni_id = glGetUniformLocation(CompShader[i][2], "ScreenTex");
|
||||
glUniform1i(uni_id, 0);
|
||||
uni_id = glGetUniformLocation(CompShader[i][2], "_3DTex");
|
||||
glUniform1i(uni_id, 1);
|
||||
}
|
||||
|
||||
#define SETVERTEX(i, x, y) \
|
||||
|
@ -33,7 +33,7 @@ void main()
|
||||
fpos.w = 1.0;
|
||||
|
||||
gl_Position = fpos;
|
||||
fTexcoord = (vPosition + vec2(1.0, -1.0)) * (vec2(256.0, -384.0) / 2.0);
|
||||
fTexcoord = (vPosition + vec2(1.0, 1.0)) * (vec2(256.0, 384.0) / 2.0);
|
||||
}
|
||||
)";
|
||||
|
||||
|
@ -410,31 +410,31 @@ void GLScreen_DrawScreen()
|
||||
switch (ScreenRotation)
|
||||
{
|
||||
case 0:
|
||||
s0 = 0; t0 = 192;
|
||||
s1 = scwidth; t1 = 192;
|
||||
s2 = 0; t2 = 192+scheight;
|
||||
s3 = scwidth; t3 = 192+scheight;
|
||||
s0 = 0; t0 = scheight;
|
||||
s1 = scwidth; t1 = scheight;
|
||||
s2 = 0; t2 = scheight+scheight;
|
||||
s3 = scwidth; t3 = scheight+scheight;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
s0 = 0; t0 = 192+scheight;
|
||||
s1 = 0; t1 = 192;
|
||||
s2 = scwidth; t2 = 192+scheight;
|
||||
s3 = scwidth; t3 = 192;
|
||||
s0 = 0; t0 = scheight+scheight;
|
||||
s1 = 0; t1 = scheight;
|
||||
s2 = scwidth; t2 = scheight+scheight;
|
||||
s3 = scwidth; t3 = scheight;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
s0 = scwidth; t0 = 192+scheight;
|
||||
s1 = 0; t1 = 192+scheight;
|
||||
s2 = scwidth; t2 = 192;
|
||||
s3 = 0; t3 = 192;
|
||||
s0 = scwidth; t0 = scheight+scheight;
|
||||
s1 = 0; t1 = scheight+scheight;
|
||||
s2 = scwidth; t2 = scheight;
|
||||
s3 = 0; t3 = scheight;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
s0 = scwidth; t0 = 192;
|
||||
s1 = scwidth; t1 = 192+scheight;
|
||||
s2 = 0; t2 = 192;
|
||||
s3 = 0; t3 = 192+scheight;
|
||||
s0 = scwidth; t0 = scheight;
|
||||
s1 = scwidth; t1 = scheight+scheight;
|
||||
s2 = 0; t2 = scheight;
|
||||
s3 = 0; t3 = scheight+scheight;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -63,11 +63,11 @@ out vec4 oColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
ivec4 pixel = ivec4(texelFetch(ScreenTex, ivec2(fTexcoord), 0));
|
||||
//ivec4 pixel = ivec4(texelFetch(ScreenTex, ivec2(fTexcoord), 0));
|
||||
|
||||
// TODO: filters
|
||||
|
||||
oColor = vec4(vec3(pixel.bgr) / 255.0, 1.0);
|
||||
//oColor = vec4(vec3(pixel.bgr) / 255.0, 1.0);
|
||||
oColor = texelFetch(ScreenTex, ivec2(fTexcoord), 0);
|
||||
}
|
||||
)";
|
||||
|
Reference in New Issue
Block a user