Skip to content

[macOS] Add GS-free visual parity paths#8082

Closed
yeojuny wants to merge 3 commits into
beyond-all-reason:masterfrom
yeojuny:codex/nogs-visual-parity
Closed

[macOS] Add GS-free visual parity paths#8082
yeojuny wants to merge 3 commits into
beyond-all-reason:masterfrom
yeojuny:codex/nogs-visual-parity

Conversation

@yeojuny

@yeojuny yeojuny commented Jun 24, 2026

Copy link
Copy Markdown

Summary

This is a draft PR for GS-free visual parity paths in BAR content.

It does not aim to disable visual features when geometry shaders are unavailable. Instead, it moves affected GL4 feature families toward equivalent mesh/VBO/vertex expansion paths:

  • adds DrawPrimitiveAtUnit_NoGS_Mesh.lua and switches the DPAU-based icon/plate/platter widgets to it
  • replaces Healthbars GL4 with a NoGS shape mesh path while keeping the existing fragment contract
  • replaces Unit Stencil GL4 proxy expansion with an explicit triangle mesh path
  • moves Decals GL4, Nano Particles GL4, and Energy Explosion Particles GL4 to explicit NoGS mesh/shape rendering paths
  • keeps the PIP NoGS path on top of the BAR 30440 PIP optimization rebase, using explicit six-vertex triangle templates instead of quad strips
  • preserves the accepted PIP close-zoom unitpic path by drawing unitpic octagons as explicit triangles instead of textured triangle fans
  • expands FlowUI build/grid progress wedges from GL.TRIANGLE_FAN to explicit GL.TRIANGLES while preserving the official layout and angle math
  • carries small shader fixes for screen distortion/orb/raptor-scum warning cleanup

Why

On the macOS Zink/MoltenVK path, geometry shaders are unavailable. A renderer-missing fallback compiles, but it loses too much visual parity. The goal here is to preserve the Windows/Linux BAR visual intent using common GL4 data flows that do not require GS support.

Validation

  • git diff --check
  • git ls-files --modified --others --exclude-standard '*.lua' | xargs -n 1 luac -p
  • luac -p luaui/Widgets/gui_pip.lua after the PIP/unitpic follow-up
  • luac -p luaui/Widgets/gui_flowui.lua luaui/Widgets/gui_pip.lua after the FlowUI progress follow-up
  • Manual scope review removed local diagnostic/polishing files that were not NoGS parity work.

Related draft PRs

Notes for reviewers

This is intentionally draft. It should be reviewed feature-family by feature-family, especially the larger Healthbars, Unit Stencil, Decals, Nano Particles, Energy Explosion Particles, and PIP changes.

The PR deliberately avoids including local diagnostic overlays, HiDPI UI polish, BAR-data, generated app files, or machine-local state. The intended review question is whether these NoGS mesh/VBO paths are acceptable as parity-preserving replacements, not merely whether a lower-quality fallback would compile.

@yeojuny yeojuny changed the title [codex] Add GS-free visual parity paths [macOS] Add GS-free visual parity paths Jun 25, 2026
@WatchTheFort

Copy link
Copy Markdown
Member

Closing as this is in contravention of our AI usage policy.

@Ruwetuin

Copy link
Copy Markdown
Member

also this has been already done #7946

@yeojuny

yeojuny commented Jun 25, 2026

Copy link
Copy Markdown
Author

Thanks, you are right that #7946 already added NoGS fallbacks. I should have described this branch more narrowly.

The distinction I was aiming for is fallback vs visual-parity replacement. In my earlier macOS experiments, simple quad/triangle fallback paths did get things rendering, and I had tried going down that same route first, but the result did not reproduce the polished BAR look I was seeing in gameplay videos. Some visible widgets, especially Health Bars GL4, did not match the original GS output very well. This branch tries to preserve the existing per-feature visual behavior by replacing the GS expansion with explicit mesh/triangle/VBO data, instead of using a simpler generic rectangle fallback.

I understand the AI-policy closure and am not asking to reopen this PR as-is. If I revisit this, I will bring a smaller human-verified patch with head-to-head screenshots/logs.

@yeojuny

yeojuny commented Jun 25, 2026

Copy link
Copy Markdown
Author

One more concrete example from this PR that I should have mentioned: luaui/Widgets/gui_pip.lua was in the same category. The PIP/minimap GL4 icon and primitive paths also needed feature-specific cleanup on the macOS Zink/MoltenVK path, e.g. replacing strip/fan assumptions with explicit triangle/VBO emission where needed.

To make that less abstract: in local BAR.app testing, Advanced/PIP minimap could show radar/sonar/range overlays but no live unit icons after spawn (nil vbo in the PIP units render path), and the close-zoom unitpic transition could distort because the unitpic octagon path still used GL.TRIANGLE_FAN. So Health Bars GL4 was the most visible example to me, but not the only place where the work was trying to preserve the existing look and behavior rather than just make a simpler fallback render something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants