Fix #187: Use A8R8G8B8 fallback for radar overlay and shroud formats#200
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #187.
On macOS (and potentially Linux) in fullscreen mode, the presentation format is negotiated as
D3D9Format::X8R8G8B8(without an alpha channel).When the game checks for texture support via
CheckDeviceFormatusing the backbuffer format, DXVK/MoltenVK returns thatA8R8G8B8andA4R4G4B4are unsupported relative toX8R8G8B8.This causes
W3DRadar::initializeTextureFormats()to fall back toWW3D_FORMAT_X8R8G8B8(the only fallback in the original implementation offindFormat).Because
X8R8G8B8does not have an alpha channel, the overlay and shroud (fog of war) textures render as solid opaque screens, causing the minimap to appear completely black/dark.Changes
findFormatinW3DRadar.cppto accept adefaultFallbackparameter (defaulting toWW3D_FORMAT_X8R8G8B8).WW3D_FORMAT_A8R8G8B8. Modern Vulkan devices supportA8R8G8B8textures natively even if DXVK's capability checks return false underX8R8G8B8swapchains.