Uh oh!
There was an error while loading. Please reload this page.
unify(w3ddisplay): Match Zero Hour texture bit depth in Generals - #3181
unify(w3ddisplay): Match Zero Hour texture bit depth in Generals#3181Jaredl-Dev wants to merge 1 commit into
Conversation
c3bdf3f to
6d508d7ComparePR Summary by QodoFix Generals control bar discoloration by forcing 32-bit texture bitdepth
AI Description
Diagram
High-Level Assessment
Files changed (1) |
Code Review by Qodo
1. Undocumented magic bitdepth |
Uh oh!
There was an error while loading. Please reload this page.
xezon
commented
Aug 21, 2026
This change somehow cannot be merged. The Merge button is greyed out. |
6d508d7 to
e21b835Compare@xezon I believe you can't merge this because the GeneralsMD CI gates appear to be stuck and won't run. I already force-pushed an amended commit with no changes, but they still got stuck. |
xezon
commented
Aug 22, 2026
GeneralsMD is not build because this change only touches Generals. Yet it is marked Required but should not be. This change cannot be merged. |
Jaredl-Dev
commented
Aug 22, 2026
Am I supposed to just close this PR and leave this bug in the game? Or are you saying that someone with the proper permissions should address the CI guard? |
stephanmeesters
commented
Aug 22, 2026
Should be possible to merge it with the command line instructions |
xezon
commented
Aug 22, 2026
I wonder if there is a bug in our build actions. But I have not seen this problem before. Perhaps try to create a duplicate of this change. |
| WW3D::Enable_Static_Sort_Lists(true); | ||
| WW3D::Set_Thumbnail_Enabled(false); | ||
| WW3D::Set_Screen_UV_Bias( TRUE ); ///< this makes text look good :) | ||
| WW3D::Set_Texture_Bitdepth(32); |
There was a problem hiding this comment.
Maybe gate the fix with #if RTS_GENERALS and add it to both games W3DDisplay.cpp files so it's there for when they are unified.
That should help also get around the CI issue.
Or was this just missing from generals only?
There was a problem hiding this comment.
I have implemented Mauller's suggestion from Discord.
1acccc5 to
c2cc58bComparec2cc58b to
4e9cdd6Comparebobtista
commented
Aug 22, 2026
I see a green "Squash and merge" button, LGTM |
This fixes the discolored control bar textures in Generals introduced by #726.
Issue
The Generals control bar displays visible discoloration and quantization across its background textures.
Root cause
Before #726, Generals selected texture formats using the device bit depth, keeping the 32-bit control bar textures intact.
#726 made Generals honor
WW3D::Get_Texture_Bitdepth(), matching Zero Hour. However, Generals still left the texture bit depth at its default value of 16. This caused the 32-bit control bar textures to be converted fromA8R8G8B8toA4R4G4B4, producing the visible discoloration.Fix
Generals now sets the texture bit depth to the selected display bit depth after display initialization is complete, restoring the effective pre-#726 rendering behavior. The existing Zero Hour call is moved to the same location to keep both implementations aligned.
Verification