Fixes red, green and blue lines artifact on AMD GPUs in Luigi's Mansion 3.
This removes the old global legacy rescaling toggle.
Instead it automatically detects the specific fragment shaders causing the issue (due to F32/U32 bitcasts on position attributes).
The legacy rescaling workaround is now applied exclusively to these broken shaders, keeping the default scaling math intact for everything else.
This PR introduces an optional Legacy Rescale Compatibility Mode that restores the previous rescale‑pass behavior for titles that rely on its quirks. While the new rescale logic is generally more correct, some games exhibit visual issues that the legacy behavior incidentally avoids.
Enabling this mode can mitigate line artifacts on AMD GPUs and reduce grey‑texture flickering on Nvidia GPUs in Luigi’s Mansion 3. This is a compatibility workaround rather than a full fix, and should only be used for titles affected by these rare edge‑case rendering problems.
Original Logic from MaranBR
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3582
Co-authored-by: John <john@eden-emu.dev>
Co-committed-by: John <john@eden-emu.dev>
This fixes weird lines at 1x resolution without impacting performance in some titles.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3385
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
The issue occurs because shaders generated without RescalingPass are too simple, triggering driver optimization bugs on some GPUs.
Fixes rendering issues in Luigi's Mansion 3 and possibly other games as well.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3346
Reviewed-by: DraVee <dravee@eden-emu.dev>
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64.
Compiling on clang is *dramatically* faster so this should be useful for CI.
Co-authored-by: crueter <crueter@eden-emu.dev>
Co-authored-by: crueter <crueter@crueter.xyz>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
When we can't track the SSBO origin of a global memory instruction,
leave it as a global memory operation and assume these pointers are in
the NVN storage buffer slots, then apply a linear search in the shader's
runtime.