Skip to content

Make the F2 UI usable on ultrawide screens - #945

Merged
miredirex merged 4 commits into
tiltedphoques:devfrom
jotagalindo:fix/ultrawide-overlay
Nov 5, 2026
Merged

miredirex merged 4 commits into
tiltedphoques:devfrom
jotagalindo:fix/ultrawide-overlay

Conversation

@jotagalindo

@jotagalindo jotagalindo commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Update: the fix moved to tiltedphoques/TiltedUI#20, which has the explanation, the measurements and the videos. I've left the original description struck through below.

tiltedphoques/TiltedUI#20 should be merged before this PR.

Hi!

I play on a 5120x1440 monitor and the F2 menu was almost impossible to use: it showed up in pieces and clicks didn't respond, especially outdoors. At 1920x1080 it worked perfectly. My intention is to contribute a small fix that can help more people with big screens.

I used AI to make this fix, Claude specifically. I tested it myself in game.

What was happening

  • View upload: TiltedUI's D3D11 handler uploaded the whole view to the GPU on every CEF paint. At this resolution that is about 30 MB each time, and with low FPS several paints pile up per frame.
  • CEF waiting on Skyrim: CEF draws the UI on the GPU and copies each frame back to memory. Outdoors Skyrim keeps the GPU maxed out, so CEF ends up waiting and drops frames: cef_debug.log shows Client rejects proposal to capture frame.

What changes (client only, TiltedUI untouched)

  • New OverlayTextureRenderHandler: uploads to the GPU only the area that changed, at most once per frame.
  • CEF starts with disable-gpu and disable-gpu-compositing: the UI is simple HTML and CSS, so drawing it on the CPU is cheap.
  • View size: taken from the swap chain. Before, it came from the bound render target, which can be 512x512 while loading.
  • Cursor: scaled by height instead of width; before, it was huge on ultrawide screens.

Testing: built on windows-2022 and tested at 5120x1440 indoors and outdoors. The menu shows up complete and responds well. Not retested yet on other GPUs than 2080 Super.

Before and after (5120x1440, outdoors in Whiterun)

Before (current dev): the menu shows up half drawn, parts of it come and go, and the cursor is huge.

https://github.com/user-attachments/assets/a8e6c51d-4dfa-46fd-9d1f-721ed32318e6

After (this PR): the connect dialog and the settings show up complete right away, and the cursor has its normal size.

https://github.com/user-attachments/assets/6cf61edc-8e51-4022-853a-d565c4450a6c

If you'd rather have any of this in TiltedUI, I'll move it there.


What this PR changes now

  • CpuRenderedOverlayApp: an OverlayApp subclass that starts CEF with disable-gpu and disable-gpu-compositing, so it draws the UI on the CPU. In TiltedUI these flags are opt-in, so the client turns them on here.
  • TiltedUI submodule bump: for now it points to the latest commit of Make the F2 UI usable on ultrawide screens TiltedUI#20; once that's merged, I'll move it to the merged commit.
  • The client's own OverlayTextureRenderHandler is removed, since that fix now lives in TiltedUI.

Closes #940

jotagalindo and others added 2 commits November 5, 2026 11:36
TiltedUI's D3D11 overlay handler copied and uploaded the whole CEF view on
every paint, through a deferred context. At 5120x1440 that is about 30 MB per
paint, and paints pile up in each game frame when the game runs below the UI's
60 fps, so the menu barely rendered and ignored clicks, worst outdoors.

The client now uses its own OverlayTextureRenderHandler: CEF paints are merged
into a CPU copy of the view, and the render thread uploads only the repainted
area with UpdateSubresource, at most once per frame. The cursor is also scaled
by the screen height instead of the width, so it no longer grows on wide screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With only the texture upload fixed, the F2 UI still showed up half drawn
outdoors at 5120x1440. cef_debug.log shows CEF dropping UI frames
("Client rejects proposal to capture frame") right when the UI changes.
CEF rasterizes the UI on the GPU and copies each frame back to memory for
OnPaint, and that work waits behind Skyrim's frames when the game keeps
the GPU busy.

The client now creates CEF through CpuRenderedOverlayApp, which adds
disable-gpu and disable-gpu-compositing, so the UI (plain HTML and CSS)
is drawn on the CPU straight into the memory OnPaint reads.

The CEF view is also sized after the swap chain's back buffer instead of
the render target bound when the UI is drawn, which was 512x512 for a
moment while loading and made CEF lay out and repaint the whole UI twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jotagalindo
jotagalindo marked this pull request as ready for review November 5, 2026 10:54
@miredirex

Copy link
Copy Markdown
Collaborator

Please PR to TiltedUI instead. I know, dealing with submodules is a bit annoying, but it is what it is

@jotagalindo

Copy link
Copy Markdown
Contributor Author

@miredirex I'll close the PR then, and open one in TiltedUI. Thanks!

@jotagalindo jotagalindo closed this Nov 5, 2026
jotagalindo added a commit to jotagalindo/TiltedEvolution that referenced this pull request Nov 5, 2026
TiltedUI no longer adds disable-gpu and disable-gpu-compositing for every
OverlayApp, so the client opts in with CpuRenderedOverlayApp, as in tiltedphoques#945.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jotagalindo jotagalindo reopened this Nov 5, 2026
The view upload fix now lives in TiltedUI (tiltedphoques/TiltedUI#20), so the
client goes back to OverlayRenderHandlerD3D11 and only opts in to CPU drawing
with CpuRenderedOverlayApp. TiltedUI points to the head of that PR, which ends
up in TiltedUI's master when the PR is merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@miredirex

Copy link
Copy Markdown
Collaborator

TiltedUI should point at c7789de2, please double check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jotagalindo

jotagalindo commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks a lot to both of you @Force67 and @miredirex, for the review and for all the help with this!

@miredirex
miredirex merged commit ed46728 into tiltedphoques:dev Nov 5, 2026
3 checks passed
absol89 pushed a commit to absol89/TiltedEvolutionScriptFixes that referenced this pull request Nov 5, 2026
* Make the F2 UI usable on ultrawide screens

TiltedUI's D3D11 overlay handler copied and uploaded the whole CEF view on
every paint, through a deferred context. At 5120x1440 that is about 30 MB per
paint, and paints pile up in each game frame when the game runs below the UI's
60 fps, so the menu barely rendered and ignored clicks, worst outdoors.

Details in tiltedphoques/TiltedUI#20
---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ed46728)
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.

Persistent stuttering every 1000ms potentially caused by STR's custom UI

2 participants