Repository navigation
d3d9.ren/opengl.ren: MSAA text on Intel Arc, model culling, the menu cursor - #38
Merged
nolffan merged 4 commits intoOct 18, 2026
Merged
Conversation
Intel Arc's driver drops whole pixels of what it draws with a ZERO or INV_SRC_COLOR-style blend factor into a multisampled target, so with Antialiasing on the menu and HUD text (drawn with LTSURFACEBLEND_MASK) came out as outlines with holes. Direct3D 9, OpenGL and dgVoodoo all show it; plain SRC_ALPHA/INV_SRC_ALPHA blending draws right. With more than one sample, a MASK blit now draws black, alpha-blended by the source's brightness, from a second texture of the surface that holds that brightness in alpha: the same result for the grey fonts it is used for. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Two differences from d3d.ren's model drawing, both seen on the wine bottle at Maxi's (glass modelled with thickness, a label inside, chrome): * d3d.ren culls a model's back-facing triangles in software (TriFacing, front = clockwise on screen). Our renderers drew both sides, so the inside of the glass showed over the label. rd_CullBack turns culling on around a model's pieces (D3DCULL_CCW; GL_BACK with GL_CCW fronts). * The chrome pass is meant to be opaque, but the skin pass of the piece before left blending on, so every later piece's chrome was drawn by the environment map's alpha and the scene showed through. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
P1Input confines the mouse while playing with SetCursor(NULL). Back in a menu, UseCursor shows the hardware cursor again (ShowCursor) but nothing gave it its image back, so it stayed invisible until an alt-tab made the engine set it. Set m_hCursor again whenever the hardware cursor is shown. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
publicarray
marked this pull request as ready for review
October 18, 2026 09:04
nolffan
self-requested a review
October 18, 2026 11:02
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.
Three fixes to the modern renderers and the menus, checked on Windows with an Intel Arc GPU, and on Linux under Xvfb (
make test-renderers).Menu and HUD text under MSAA on Intel Arc (
cfb88fd). With Antialiasing on, Intel Arc's driver drops whole pixels of what it draws with a ZERO or INV_SRC_COLOR-style blend factor into a multisampled target. The menu and HUD text, drawn withLTSURFACEBLEND_MASK, came out as outlines with holes, in Direct3D 9, OpenGL and dgVoodoo alike. With more than one sample, a MASK blit now draws black, alpha-blended by the source's brightness, from a second texture of the surface that holds that brightness in alpha: the same result for the grey fonts it is used for.Windows 11, Intel Arc,
d3d9.ren, 1920x1080, Antialiasing 4, main menu; before left, after right:Under Xvfb (Mesa, software rendering) the text is solid with and without the fix: the bug is the Arc driver's.
Models drawn as
d3d7.rendraws them (ae5570c).d3d9.renandopengl.rendrew models' back faces, and chrome passes (bottles, glasses) translucent. Back faces are now culled, and the chrome passes stay opaque. The OpenGL cull takes clockwise faces as the front, as Direct3D does:GL_CCWculled the front faces in this renderer's window space, and models drew their insides (the wine bottle without its label, a matchbook's underside).T01S02's opening, Cate Archer's residence, the bottle and glass on the shelf. Windows, Intel Arc, before left, after right (a back face cuts through the label, and the glass shows its inner faces):
Linux, Xvfb, before left, after right:
After the fix,
make test-renderers(from thetest-modernPR):d3d7.ren|d3d9.ren|opengl.ren:The hardware cursor shows when a menu opens during play (
de9c3ae), without an alt-tab: its shape is restored as the menu opens.🤖 Generated with Claude Code