mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-25 21:03:51 +00:00
fix: remove Y-flip counter-hacks in FSR shaders; invert mouse by default; FSR1 disables MSAA
FSR EASU and FSR2 sharpen fragment shaders had a manual Y-flip to undo the now-removed postprocess.vert flip. Strip those since the vertex shader no longer flips, making all postprocess paths consistent. Also flip the default mouse Y-axis to match user expectation (mouse down = look up / flight-sim style) and make FSR1 disable MSAA on enable, matching FSR2 behaviour (FSR provides its own spatial AA).
This commit is contained in:
parent
f8f57411f2
commit
ebaf95cc42
6 changed files with 10 additions and 8 deletions
|
|
@ -10,9 +10,7 @@ layout(push_constant) uniform PushConstants {
|
||||||
} pc;
|
} pc;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
// Undo the vertex shader Y flip (postprocess.vert flips for Vulkan overlay,
|
vec2 tc = TexCoord;
|
||||||
// but we need standard UV coords for texture sampling)
|
|
||||||
vec2 tc = vec2(TexCoord.x, 1.0 - TexCoord.y);
|
|
||||||
|
|
||||||
vec2 texelSize = pc.params.xy;
|
vec2 texelSize = pc.params.xy;
|
||||||
float sharpness = pc.params.z;
|
float sharpness = pc.params.z;
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -21,9 +21,7 @@ vec3 fsrFetch(vec2 p, vec2 off) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
// Undo the vertex shader Y flip (postprocess.vert flips for Vulkan overlay,
|
vec2 tc = TexCoord;
|
||||||
// but we need standard UV coords for texture sampling)
|
|
||||||
vec2 tc = vec2(TexCoord.x, 1.0 - TexCoord.y);
|
|
||||||
|
|
||||||
// Map output pixel to input space
|
// Map output pixel to input space
|
||||||
vec2 pp = tc * fsr.con2.xy; // output pixel position
|
vec2 pp = tc * fsr.con2.xy; // output pixel position
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -162,7 +162,7 @@ private:
|
||||||
|
|
||||||
// Mouse settings
|
// Mouse settings
|
||||||
float mouseSensitivity = 0.2f;
|
float mouseSensitivity = 0.2f;
|
||||||
bool invertMouse = false;
|
bool invertMouse = true;
|
||||||
bool mouseButtonDown = false;
|
bool mouseButtonDown = false;
|
||||||
bool leftMouseDown = false;
|
bool leftMouseDown = false;
|
||||||
bool rightMouseDown = false;
|
bool rightMouseDown = false;
|
||||||
|
|
|
||||||
|
|
@ -3865,7 +3865,13 @@ void Renderer::setFSREnabled(bool enabled) {
|
||||||
if (fsr_.enabled == enabled) return;
|
if (fsr_.enabled == enabled) return;
|
||||||
fsr_.enabled = enabled;
|
fsr_.enabled = enabled;
|
||||||
|
|
||||||
if (!enabled) {
|
if (enabled) {
|
||||||
|
// FSR1 upscaling renders its own AA — disable MSAA to avoid redundant work
|
||||||
|
if (vkCtx && vkCtx->getMsaaSamples() > VK_SAMPLE_COUNT_1_BIT) {
|
||||||
|
pendingMsaaSamples_ = VK_SAMPLE_COUNT_1_BIT;
|
||||||
|
msaaChangePending_ = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Defer destruction to next beginFrame() — can't destroy mid-render
|
// Defer destruction to next beginFrame() — can't destroy mid-render
|
||||||
fsr_.needsRecreate = true;
|
fsr_.needsRecreate = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue