cormac-obrien / richter

A modern Quake engine.
http://c-obrien.org/richter/
MIT License
528 stars 32 forks source link

Add more tools #24

Closed cormac-obrien closed 4 years ago

cormac-obrien commented 4 years ago

Output capture

The render pipeline has been updated to include an additional stage. Before updating the swap chain, the final image is rendered to a COPY_SRC texture. This allows the texture to be copied into a buffer, mapped into host memory and saved as a PNG. This is performed with the screenshot console command, seen below:

richter-2020-07-08T18-59-33

Client frame tracing

The client now implements a basic tracing API. Client data from frames run during a trace will be recorded. When the trace ends, the data is serialized as JSON and dumped to a file. Tracing is controlled with the trace_begin and trace_end console commands.

This feature was used to solve the "jitter" of the client view, which was caused by incorrect ordering of time and position updates. Below are graphs of the interpolated client position before and after the fix. (Note that the first graph was traced at host_maxfps 60, while the latter was traced at host_maxfps 144.)

Before

lerp-diagnostics-bad

After

lerp-diagnostics-good

Miscellaneous

cormac-obrien commented 4 years ago

bors r+

bors[bot] commented 4 years ago

Build succeeded: