mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
Fix display drawing
Disable depth-testing, the display vertex-shader, and the viewport/scissor positioning of the bottom screen. We have visual!
This commit is contained in:
parent
e4195d4d4d
commit
57ee0a3db9
2 changed files with 6 additions and 22 deletions
|
@ -2,22 +2,6 @@
|
|||
layout(location = 0) out vec2 UV;
|
||||
|
||||
void main() {
|
||||
const vec4 positions[4] = vec4[](
|
||||
vec4(-1.0, 1.0, 1.0, 1.0), // Top-left
|
||||
vec4(1.0, 1.0, 1.0, 1.0), // Top-right
|
||||
vec4(-1.0, -1.0, 1.0, 1.0), // Bottom-left
|
||||
vec4(1.0, -1.0, 1.0, 1.0) // Bottom-right
|
||||
);
|
||||
|
||||
// The 3DS displays both screens' framebuffer rotated 90 deg counter clockwise
|
||||
// So we adjust our texcoords accordingly
|
||||
const vec2 texcoords[4] = vec2[](
|
||||
vec2(1.0, 1.0), // Top-right
|
||||
vec2(1.0, 0.0), // Bottom-right
|
||||
vec2(0.0, 1.0), // Top-left
|
||||
vec2(0.0, 0.0) // Bottom-left
|
||||
);
|
||||
|
||||
gl_Position = positions[gl_VertexIndex];
|
||||
UV = texcoords[gl_VertexIndex];
|
||||
UV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
||||
gl_Position = vec4(UV * 2.0f + -1.0f, 0.0f, 1.0f);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue