The full view is now the default. While the renderer process covers the whole view (Channel::covering, set after each frame it presents), the adapter skips the client's renderer's clears and draws, decided per frame; the client's renderer still gets state and resources, and draws again as soon as the renderer process stops covering the view. The client's window no longer gets WS_CLIPCHILDREN: the client draws when its window gets WM_PAINT, which a window entirely covered by clipped children never gets (it fell to about one frame a second). The flip model swap chain shows above the client's drawing anyway. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
64e152de3c
commit
2d9da249fa
9 files changed
+74
-27
No files matched your search
+15
-9
@@ -29,19 +29,25 @@ creates (each 3D view, and again on room changes), the adapter:
|
||||
|
||||
The renderer process draws into a child window it creates inside the client's window: window handles are valid in
|
||||
every process, and Windows allows child windows across processes (Chrome's GPU process works this way). The child
|
||||
is disabled so mouse input goes to the client's window under it, and the adapter gives the client's window
|
||||
`WS_CLIPCHILDREN` so the client's own drawing stays out of it. The process exits when the engine is destroyed or the
|
||||
client exits.
|
||||
is disabled so mouse input goes to the client's window under it. Its swap chain is a flip model one, which the
|
||||
compositor shows above the client's own drawing. The client's window must not clip its children (`WS_CLIPCHILDREN`):
|
||||
the client draws a frame when its window gets `WM_PAINT` (`SceneWindow.dll` invalidates it, and draws on the paint),
|
||||
and a window entirely covered by clipped children never gets one, so the client fell to about one frame a second.
|
||||
The process exits when the engine is destroyed or the client exits.
|
||||
|
||||
## Status
|
||||
|
||||
The renderer process draws the client's whole scene, over the right half of the 3D view, beside the client's own
|
||||
Direct3D renderer on the left (the adapter still forwards everything to it). Checked in rooms with screenshots of
|
||||
both renderers side by side (the compare view): they match, particles and the 2D overlay (name tags) included.
|
||||
The renderer process draws the whole 3D view in place of the client's renderer (the full view, the default). The
|
||||
adapter still forwards everything to the client's Direct3D renderer (state and resources: it draws render targets and
|
||||
reads textures back, which the renderer process doesn't yet), but while the renderer process covers the whole view
|
||||
(`Channel::covering`, set after each frame it presents) the client's renderer skips its clears and draws, decided per
|
||||
frame; it draws again as soon as the renderer process stops covering the view (the view changes, or the process
|
||||
fails). Checked in rooms with screenshots of both renderers side by side (the compare view): they match, particles
|
||||
and the 2D overlay (name tags) included.
|
||||
|
||||
For comparing while the client runs (development):
|
||||
|
||||
- Views: `T5DE_RENDERER_VIEW` (off, split, full or compare) when the client starts, or
|
||||
- Views: `T5DE_RENDERER_VIEW` (off, split, full (the default) or compare) when the client starts, or
|
||||
`%TEMP%\t5de-renderer-view.txt` holding one of those at any time. Compare draws the left half's scene over the
|
||||
right half, so both renderers show the same thing side by side.
|
||||
- `%TEMP%\t5de-renderer-shaders\fixed_function.hlsl`, if present, replaces the built-in shaders and is reloaded
|
||||
@@ -63,8 +69,8 @@ For comparing while the client runs (development):
|
||||
the right half visibly trails, mostly from compositing another process's window over Remote Desktop. The
|
||||
renderer process draws only the newest frame when it falls behind, and keeps at most one frame queued.
|
||||
|
||||
Next: render targets (offscreen frames are skipped), the renderer process drawing the whole view in place of the
|
||||
client's renderer, and one renderer process for all of a client's views.
|
||||
Next: render targets (offscreen frames are skipped, and drawn by the client's renderer), and one renderer process for
|
||||
all of a client's views.
|
||||
|
||||
## Building
|
||||
|
||||
|
||||
Reference in new issue
Block a user