Please sign in to comment.
EFB2RAM: Apply copy filter as a float coefficient after sampling
Using 8-bit integer math here lead to precision loss for depth copies, which broke various effects in games, e.g. lens flare in MK:DD. It's unlikely the console implements this as a floating-point multiply (fixed-point perhaps), but since we have the float round trip in our EFB2RAM shaders anyway, it's not going to make things any worse. If we do rewrite our shaders to use integer math completely, then it might be worth switching this conversion back to integers. However, the range of the values (format) should be known, or we should expand all values out to 24-bits first.
- Loading branch information...
Showing with 38 additions and 35 deletions.
- +2 −2 Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
- +2 −2 Source/Core/VideoBackends/D3D/TextureCache.cpp
- +3 −3 Source/Core/VideoBackends/OGL/TextureCache.cpp
- +3 −3 Source/Core/VideoBackends/OGL/TextureConverter.cpp
- +1 −1 Source/Core/VideoBackends/Vulkan/TextureCache.cpp
- +2 −2 Source/Core/VideoBackends/Vulkan/TextureConverter.cpp
- +8 −4 Source/Core/VideoCommon/TextureCacheBase.cpp
- +1 −1 Source/Core/VideoCommon/TextureCacheBase.h
- +10 −13 Source/Core/VideoCommon/TextureConversionShader.cpp
- +6 −4 Source/Core/VideoCommon/TextureConverterShaderGen.cpp