fix(graphics): correct skinned mesh rendering black on macOS#169
Merged
Conversation
Add box filter downsampling for D3DFMT_A4R4G4B4 and D3DFMT_R5G6B5 formats in the macOS block of D3DXLoadSurfaceFromSurface in d3dx8_compat.cpp. Previously, D3DXFilterTexture would fail to generate mipmaps for recolored textures, rendering infantry units as solid black silhouettes at typical gameplay distances. Also align base game shader stage states and blend modes with Zero Hour to prevent invalid pipeline configurations, force white diffuse for skins, and update the development blog. Fixes #166
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 #166. Correct skinned mesh rendering black on macOS under Vulkan/DXVK.
Changes
GeneralsMD/Code/CompatLib/Source/d3dx8_compat.cpp):D3DFMT_A4R4G4B4(Format 7) andD3DFMT_R5G6B5formats in the macOS/Apple block ofD3DXLoadSurfaceFromSurface. This ensuresD3DXFilterTexturesuccessfully generates mipmaps for team/house recolored textures on macOS instead of failing and leaving the lower levels black.Generals/Code/Libraries/Source/WWVegas/WW3D2/shader.cpp&shader.h):DETAILCOLOR_ADDSIGNED,DETAILCOLOR_ADDSIGNED2X,DETAILCOLOR_SCALE2X,DETAILCOLOR_MODALPHAADDCOLOR) andSSCAT_SCREENsort category, ensuring invalid shader configurations are avoided.Core/Libraries/Source/WWVegas/WW3D2/dx8renderer.cpp):0xFFFFFFFF) for skin rendering vertices since diffuse arrays are often null on base game models, and configuredD3DMCS_COLOR1diffuse source while disabling D3D lighting for skinned rendering category list, matching original VC6/D3D8 behavior.