mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
postprocess.vert.glsl had `TexCoord.y = 1.0 - TexCoord.y` which inverted the vertical sampling of the scene texture. Vulkan textures use v=0 at the top, matching framebuffer row 0, so no flip is needed. The camera already flips the projection matrix (mat[1][1] *= -1) so the scene is rendered correctly oriented; the extra inversion in the postprocess pass flipped FXAA output upside down. Fixes: FXAA shows camera upside down Also fixes: FSR1 upscale and FSR3 sharpen passes (same vertex shader)
12 lines
460 B
GLSL
12 lines
460 B
GLSL
#version 450
|
|
|
|
layout(location = 0) out vec2 TexCoord;
|
|
|
|
void main() {
|
|
// Fullscreen triangle trick: 3 vertices, no vertex buffer
|
|
TexCoord = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
|
gl_Position = vec4(TexCoord * 2.0 - 1.0, 0.0, 1.0);
|
|
// No Y-flip: scene textures use Vulkan convention (v=0 at top),
|
|
// and NDC y=-1 already maps to framebuffer top, so the triangle
|
|
// naturally samples the correct row without any inversion.
|
|
}
|