Overlay ​

You draw an immediate-mode 2D overlay on top of the game by registering a paint callback. Once per presented frame, the core calls it with a Paint handle, then issues the draw calls you make through that handle.

Headerswofty/overlay.hpp
Namespaceswofty::overlay
TableSwoftyApi::overlay (SwoftyOverlay)
Featureoverlay — experimental, on while an addon lists it in experimental_features
API version6
ThreadRender thread (the swapchain present path) for paint callbacks

Position your overlay in framebuffer pixels, measured from the top-left. The drawable size changes with the window, so query it each frame. Colours use 0xRRGGBBAA.

To check whether on_paint, remove or load_image succeeded, use the returned swofty::overlay::Result (ok, late, unavailable, invalid); see the result codes. The draw calls return nothing.

Calls ​

CallDoes
available()true once the feature is on and implemented
on_paint(fn, user = nullptr, token = nullptr)registers a per-frame callback and fills token
remove(token)drops a paint callback; invalid for an unknown token
size(paint, &w, &h)writes the drawable size in pixels
rect(paint, x, y, w, h, rgba)filled rectangle
rect_outline(paint, x, y, w, h, thickness, rgba)rectangle outline
line(paint, x0, y0, x1, y1, thickness, rgba)line segment
text(paint, x, y, font_size, rgba, utf8)text in the built-in font in a box font_size pixels tall; (x, y) is its top-left. \n starts a new line. Characters the font lacks draw as ?
measure(paint, font_size, utf8, &w, &h)writes the bounds the text would occupy
load_image(id, file)loads a PNG or uncompressed 32-bit DDS from the addon folder under id; invalid for a bad id, a missing or unreadable file, or an image over 4096 pixels on a side
image(paint, id, x, y, w, h, tint = 0xffffffff)draws a loaded texture into the rectangle, multiplied by tint; invalid for an unknown id

Text ​

The built-in font is Titillium Web SemiBold (SIL Open Font License 1.1), drawn from a signed distance field atlas, so it stays sharp from 12 to 72 pixels and beyond. It covers ASCII, Latin-1, curly quotes, dashes, the bullet, the ellipsis, € and ™, and applies the font's kerning; an addon can also load its own fonts (v5). font_size is the font's em size in pixels and the height of one line box; the capitals and descenders sit centred in it. Lines after the first advance by line_height × font_size.

v2 calls ​

A core that exports SwoftyCoreOverlayVersion (overlay version 2) implements these calls. v2() returns true there. On an older core, rect_rounded, rect_rounded_outline and gradient draw the nearest v1 rectangle, polyline draws v1 lines, styled text and measure use the v1 calls, and the other calls draw nothing.

CallDoes
v2()true when the core implements the v2 calls
rect_rounded(paint, x, y, w, h, radius, rgba)anti-aliased filled rectangle with rounded corners; a radius over half the shorter side makes a pill or circle
rect_rounded_outline(paint, x, y, w, h, radius, thickness, rgba)its outline, drawn inside the rectangle
gradient(paint, x, y, w, h, from, to, horizontal = false, radius = 0)rectangle filled with a linear gradient, top to bottom or left to right; colours interpolate per channel
circle(paint, cx, cy, radius, rgba)anti-aliased filled circle
circle_outline(paint, cx, cy, radius, thickness, rgba)circle outline, drawn inside the radius
arc(paint, cx, cy, radius, from, to, thickness, rgba)arc stroke centred on the radius. Angles are radians, 0 points right and angles grow clockwise on screen. A sweep of 2Ï€ is a closed ring
polyline(paint, xy, count, thickness, rgba, closed = false)line strip through count points (xy is x0, y0, x1, y1, …) with mitred joins
polygon(paint, xy, count, rgba)filled convex polygon
text(paint, x, y, style, utf8)text laid out by a TextStyle and anchored at (x, y) by its alignment
measure(paint, style, utf8, &w, &h)the widest line and the height of all lines
text_in(paint, rect, style, utf8)text aligned inside a Rect
image(paint, id, x, y, w, h, u0, v0, u1, v1, tint = 0xffffffff)draws the part (u0, v0)–(u1, v1) of a loaded texture, in 0–1 texture coordinates
image_nine(paint, id, x, y, w, h, left, top, right, bottom, scale = 1, tint = 0xffffffff)nine-slice panel: the corners (insets in texture pixels) keep their size times scale, the edges stretch along one axis and the centre along both. Insets shrink when the panel is smaller than them
image_size(id, &w, &h)pixel size of a loaded texture
push_clip(paint, x, y, w, h) / pop_clip(paint)clips later drawing to a rectangle, intersected with the current clip. Under a transform the clip is the rectangle's screen bounds
push_transform(paint, m) / pop_transform(paint)multiplies the current transform by m = {a, b, c, d, e, f}: x' = a·x + c·y + e, y' = b·x + d·y + f
push_translate(paint, dx, dy), push_scale(paint, sx, sy, cx = 0, cy = 0), push_rotate(paint, angle, cx = 0, cy = 0)push a translation, a scale about (cx, cy) or a clockwise rotation about (cx, cy); pop each with pop_transform
push_opacity(paint, opacity) / pop_opacity(paint)multiplies the alpha of later drawing by opacity (0–1)
ClipScope, TransformScope, OpacityScopepush in the constructor and pop in the destructor
safe_area(paint)the frame inset by 3.5% on each side, as a Rect
ui_scale(paint)min(width / 1920, height / 1080): multiply sizes laid out for 1920×1080 by it

Strokes, rounded rectangles, circles, arcs and polygons have a one-pixel anti-aliased edge. A stroke of thickness t is opaque over t - 1 pixels with a one-pixel fade on each side; a stroke under one pixel is a faded hairline. v1 rect, rect_outline and line keep their hard edges. Transforms apply to every call, v1 calls included; stroke thicknesses scale with the transform.

Each paint callback starts with no clip, no transform and full opacity, whatever the previous callback left pushed. Pop what you push inside the same callback. A stack holds 64 entries; a push past that is ignored along with its pop.

TextStyle ​

FieldDefaultMeaning
size16font size in pixels: one line box tall
rgba0xfffffffftext colour
alignalign::left | align::topone of align::left, align::center, align::right combined with one of align::top, align::middle, align::baseline, align::bottom. Each line aligns to x; the block aligns to y, and baseline puts the first line's baseline on y
tracking0extra pixels after each glyph
line_height1.2line advance as a multiple of size
outline, outline_px0, 0outline colour and width in pixels; drawn when the colour's alpha is non-zero
shadow, shadow_dx, shadow_dy, shadow_blur0, 0, 0, 0drop shadow colour, offset and blur in pixels; drawn when the colour's alpha is non-zero
max_width0wraps at the last space that keeps a line inside it, mid-word when one word is wider; 0 does not wrap

The C table reads a SwoftyTextStyle up to its size field.

Input and focus (v3) ​

A core whose SwoftyCoreOverlayVersion returns 3 or more also has input and focus; v3() returns true there. The core subclasses the window the drawn swapchain presents to and folds its mouse, wheel, character and key messages into one snapshot per frame.

CallDoes
v3()true when the core implements input and focus
input(paint)this frame's Input for the calling addon
focus(on)takes (true) or gives back (false) input focus for the calling addon; late when the focus is taken but the core has not hooked the game window yet, invalid when giving back a focus the addon does not hold

What an addon's Input holds depends on the focus:

FocusInput
Nobody holds itx, y (the cursor in framebuffer pixels), the mouse buttons (buttons, pressed, released: mouse::left, mouse::right, mouse::middle; from version 6, before it only the focus holder got them), the keys (keys_down, keys_pressed, keys_typed), the gamepad (pad_*) and game controllers (joy_*, v6). focused is 0
The addon holds iteverything: also wheel (notches, positive away from the player) and up to 16 typed characters in chars (UTF-32, char_count). focused is 1
Another addon holds itx and y are -1 and nothing else is set

key_down(vk), key_pressed(vk), key_typed(vk), clicked(button), held(button), pad_held(button), pad_hit(button), joy_held(n), joy_hit(n), any_pressed() and inside(x, y, w, h) read an Input. Keys are Windows virtual-key codes; keys_pressed holds the keys that went down this frame and keys_typed also their auto-repeats.

While the game has a text box open (naming a team, for example) an addon that does not hold focus gets no keys, so a hotkey does not fire from typed letters.

A click an addon sees without focus also reaches the game: only the focus holder keeps the mouse from it. The toolkit's widgets react only while their addon holds focus.

The gamepad fields come from xinput1_4.dll!XInputGetState, read while an addon calls input():

FieldHolds
pad_connecteda bit per connected XInput slot
pad_buttonsthe buttons held on any pad (pad::up, pad::down, pad::left, pad::right, pad::a, pad::b, pad::x, pad::y, pad::lb, pad::rb, pad::start, pad::back); the left stick past half way also holds the d-pad
pad_pressedbuttons that went down this frame; a held d-pad direction presses again after 400 ms, then every 90 ms
pad_lx, pad_ly, pad_rx, pad_rythe first connected pad's sticks, -1 to 1 with a deadzone, up positive
pad_lt, pad_rtthe triggers, 0 to 1

While an addon holds focus, the core keeps mouse moves, button presses, the wheel, typed characters, key presses and raw input (WM_INPUT) from the game and draws a cursor. Button and key releases and Alt key combinations still reach the game. The newest focus(true) wins. The focus goes back by itself when its addon has not painted for 2 s, and swofty/loader.log says so. Gamepads and wheels still reach the game while an addon holds focus: the core reads XInput and watches the game's DirectInput reads but blocks neither.

Images from memory (v4) ​

A core whose SwoftyCoreOverlayVersion returns 4 or more also has load_image_rgba; v4() returns true there.

cpp
std::vector<uint8_t> px(256 * 64 * 4); // straight RGBA8, top row first
// ... fill px ...
if (ov::load_image_rgba("atlas", 256, 64, px.data()) == ov::Result::ok)
    ; // draw "atlas" with image() or image_uv() as if it came from a file
CallDoes
v4()true when the core implements load_image_rgba
load_image_rgba(id, width, height, rgba)loads width*height*4 bytes of straight RGBA8 under id; the core copies them, so the buffer can go once the call returns. Loading an id again replaces it. invalid for an empty id, no pixels or a side outside 1..4096; unavailable on a core before version 4
text
[overlay] api: author.my-addon load_image_rgba atlas (256x64) -> ok (slot 3)

Fonts and concave shapes (v5) ​

A core whose SwoftyCoreOverlayVersion returns 5 or more also loads fonts and fills concave polygons; v5() returns true there.

cpp
#include <swofty/overlay.hpp>

#include <iterator>
#include <vector>

namespace ov = swofty::overlay;

static std::vector<float> tab;

static void paint(SwoftyPaint *p, void *)
{
    float s = ov::ui_scale(p);
    ov::TextStyle title;
    title.font = "display";
    title.size = 48 * s;
    title.tracking = 1 * s;
    title.outline = 0x000000ff;
    title.outline_px = 2 * s;
    ov::text(p, 100 * s, 100 * s, title, "FASTEST LAP");

    float w = 0, h = 0;
    ov::measure(p, title, "FASTEST LAP", &w, &h);
    ov::rect(p, 100 * s, 100 * s + h, w, 4 * s, 0xe10600ff);

    ov::TextStyle number = title;
    number.font = "numbers";
    number.align = ov::align::right | ov::align::baseline;
    ov::text(p, 1820 * s, 140 * s, number, "1:23.456");

    ov::push_scale(p, s, s);
    ov::polygon_concave(p, tab.data(), uint32_t(tab.size() / 2), 0x15151ce0);
    ov::polyline(p, tab.data(), uint32_t(tab.size() / 2), 2, 0xe10600ff, true);
    ov::pop_transform(p);
}

SWOFTY_ON_LOAD
{
    if (!ov::available() || !ov::v5())
        return;
    ov::load_font("display", "fonts/Display-Bold.ttf");
    ov::load_font("numbers", "fonts/Numbers-Black.otf");

    // x, y, in tangent, out tangent; tangents are relative to their vertex, as After Effects stores shape paths.
    const ov::PathVertex shape[] = {
        {1500, 200, 0, 0, 0, 0},   {1700, 200, 0, 0, 40, 0}, {1740, 240, 0, -40, 0, 0},
        {1700, 280, 40, 0, 0, 0},  {1500, 280, 0, 0, 0, 0},  {1540, 240, 0, 0, 0, 0},
    };
    ov::flatten_path(shape, std::size(shape), true, tab);
    ov::on_paint(paint);
}

An addon that unpacks a font itself passes the bytes; the core copies them:

cpp
std::vector<uint8_t> bytes = unpack_font();
ov::load_font_memory("numbers", bytes.data(), bytes.size());
CallDoes
v5()true when the core implements the calls below
load_font(id, file)loads a TrueType or OpenType font (TrueType or CFF outlines) from the addon folder under id. Loading an id again replaces it. invalid for an empty id, a path outside the addon folder, a missing, empty or unreadable file, a file over 32 MB, or bytes that are not a font; unavailable on a core before version 5
load_font_memory(id, bytes, size)loads a font from size bytes in memory; the core copies them. Same results as load_font
TextStyle::fontthe id of a font the addon loaded; text, text_in and measure with the style draw and measure in it. Empty, or an id the addon has not loaded, is the built-in font, and so is every font on a core before version 5
polygon_concave(paint, xy, count, rgba)filled simple polygon through count points, convex or concave, either winding, with the one-pixel anti-aliased edge of polygon. A last point equal to the first is dropped. Up to 2048 points; draws nothing on a core before version 5
PathVertex, flatten_path(vertices, count, closed, xy, tolerance = 0.25f)in swofty/overlay_path.hpp, which swofty/overlay.hpp includes: flattens a cubic bezier path into points (x0, y0, x1, y1, …) for polygon_concave, polygon and polyline and returns how many. A segment runs from a vertex along its out tangent (out_x, out_y) to the next vertex's in tangent (in_x, in_y); tangents are relative to their vertex and zero tangents make a straight segment. A closed path also runs from the last vertex back to the first and does not repeat the first point. Points stay within tolerance of the curve, in the path's units

A font draws like the built-in font: size is its em size and one line box, with its capitals (the height of H) and descenders (the lowest of g, j, p, q, y) centred in the box. Kerning comes from the font's kern table or its GPOS pair adjustments; tracking, line height, wrapping, alignment, outline and shadow apply as they do to the built-in font. A codepoint the font lacks draws from the built-in font, and one neither has draws as the built-in ?; a tab and a no-break space draw as the font's space. One codepoint draws one glyph: ligatures and other GSUB substitutions are not applied.

Each glyph is rasterised into a signed distance field the first time it draws, at 64 pixels per em with an 8 pixel spread, onto 1024×1024 atlas pages, so it stays sharp at any size. load_font rasterises printable ASCII (U+0020 to U+007E) before it returns. A font holds up to 8 pages, and each page takes one of the overlay's image slots; a glyph past them draws nothing. Fonts belong to the addon that loaded them.

text
[overlay] api: author.my-addon load_font display (swofty/addons/author.my-addon/fonts/Display-Bold.ttf: Display Bold, TrueType outlines, 95 glyphs on 1 page(s)) -> ok

The C table reads the font id from SwoftyTextStyle.font_id (const char *, v5); NULL or "" is the built-in font.

Game controllers (v6) ​

A core whose SwoftyCoreOverlayVersion returns 6 or more fills three more Input fields, appended after pad_rt, and gives every addon the mouse buttons while nobody holds focus; v6() returns true there.

F1 25 reads wheels, joysticks and other game controllers through DirectInput only, and XInput does not list a wheel such as a Logitech G920 under Wine or Proton, so pad_* never sees it. The first time an addon calls input(), the core hooks IDirectInputDevice8::GetDeviceState in dinput8.dll and reads each joystick state (DIJOYSTATE2 or DIJOYSTATE) the call hands the game, after the game's call and without changing it. Keyboard and mouse states are left alone.

FieldHolds
joy_connecteda bit per controller the game read in the last 2 s (up to 8)
joy_buttonsthe first 32 buttons held on any controller; bit n is DirectInput button n
joy_pressedthe buttons that went down since the last frame; a press shorter than a frame still shows once. A button already held when the core first sees the controller is not a press

joy_held(n) and joy_hit(n) read button n (0 to 31). any_pressed() is true when a key, a mouse button, a gamepad button or a game controller button went down this frame:

cpp
void paint_intro(ov::Paint *p, void *)
{
    if (!intro_open)
        return;
    draw_grid_card(p);
    if (ov::input(p).any_pressed())
        intro_open = false;
}

A controller's buttons are numbered as DirectInput numbers them, which can differ from the labels on it. The POV hat (a wheel's d-pad) is not a button. A gamepad the game also reads through DirectInput shows in both pad_* and joy_*.

swofty/loader.log says where the hook sits, each controller the game reads, and the first presses:

text
[overlay] input: IDirectInputDevice8W::GetDeviceState hooked at dinput8.dll+0x4f30; addons read wheel and joystick buttons from the game's own reads
[overlay] input: game controller 000000000A3C1D48 read by the game through DirectInput (DIJOYSTATE2), slot 0
[overlay] input: game controller slot 0 buttons 0x00000001 went down

SWOFTY_OVERLAY_KILL=joy (or "overlay_kill": ["joy"] in swofty/assets.json) leaves dinput8.dll unhooked and the joy_* fields 0.

Toolkit ​

swofty/overlay_ui.hpp (namespace swofty::overlay::ui) is a header-only immediate-mode toolkit built on the calls above. Keep one State per addon and make a Ui at the top of each paint callback. Rects are framebuffer pixels; the Theme sizes are for 1920×1080 and scale with ui_scale().

CallDoes
Ui(paint, state, theme = {})reads this frame's input and the UI scale
panel(ui, rect, title)a gradient panel with a title bar; returns the content rect
label(ui, rect, text, rgba = theme text, align = left | middle)text aligned in a rect
button(ui, rect, text)true on the frame a click inside it is released inside it
toggle(ui, rect, text, &on)a labelled switch; true when clicked
slider(ui, rect, text, &value, lo, hi, fmt = "%.0f")a labelled track with the value printed with fmt; drag it or use the wheel over it; true while the value changes
list(ui, rect, id, count, item, &selected, &scroll)a clipped scrolling list; item(i) returns row i's text; the wheel scrolls it and a click selects; true when the selection changes
text_field(ui, rect, id, &text, max_bytes = 128, placeholder = {})a one-line text field; true when the text changes
clipboard_text(), set_clipboard_text(utf8)read and write the clipboard's text
toast(state, text, seconds = 3)queues a message; at most 5 are kept
draw_toasts(ui)draws the queue at the top right of the safe area, sliding in and fading out

Buttons, toggles, sliders, lists and text fields react only while the addon holds focus, to the mouse, the keyboard and the gamepad:

InputDoes
Up/down (d-pad, left stick, arrow keys)moves to the previous or next widget; a list moves its selection first, until its first or last row
Tab, Shift+Tab, RB, LBmoves to the next or previous widget
A, Enter, Spacepresses a button or toggle, starts editing a text field
Left/rightmoves a slider by 5%
Triggersmove a slider continuously, the full range in 2 s
B, Escsets Ui::back; the addon decides what it closes

Navigation draws a ring around the current widget and hides it when the mouse moves. While a text field is edited, the keyboard edits it: typing inserts at the caret, Backspace and Delete remove, Left/Right/Home/End move the caret (with Shift they select), Ctrl+A selects all, Ctrl+C, Ctrl+X and Ctrl+V copy, cut and paste, and Enter, Esc, Tab, B or a click outside end editing.

Theme::toast_at places toasts: ToastAt::left_middle (the default, on the left edge of the safe area under the game's standings tower), ToastAt::top_center or ToastAt::top_right (over the game's timing box).

A typical addon opens its panel and takes focus on a hotkey:

cpp
#include <swofty/overlay_ui.hpp>

namespace ov = swofty::overlay;
namespace ui = swofty::overlay::ui;

static ui::State state;
static bool open, assist = true;
static float volume = 50;

static void paint(SwoftyPaint *p, void *)
{
    ui::Ui u(p, state);
    if (u.in.key_pressed(VK_F8)) {
        open = !open;
        ov::focus(open);
    }
    if (open) {
        ov::Rect safe = ov::safe_area(p);
        ov::Rect c = ui::panel(u, {safe.x, safe.y, u.u(420), u.u(220)}, "My addon");
        ui::toggle(u, {c.x, c.y, c.w, u.u(40)}, "Assist", assist);
        ui::slider(u, {c.x, c.y + u.u(48), c.w, u.u(52)}, "Volume", volume, 0, 100);
        if (ui::button(u, {c.x, c.y + u.u(110), u.u(160), u.u(40)}, "Save"))
            ui::toast(state, "Saved");
    }
    ui::draw_toasts(u);
}

Limits ​

A frame holds up to 131,072 vertices across every paint callback; primitives past that are dropped, and swofty/loader.log says so once. The core keeps the layouts of up to 512 recently drawn strings, so a string drawn every frame with the same style is laid out once. The core holds up to 255 loaded images, font atlas pages included. Each image uploads to the GPU once, the first frame after load_image; loading the same id again replaces it.

Callbacks ​

Your callback, fn, has the signature void(SwoftyPaint *paint, void *user). Use the draw calls, size and measure only inside a paint callback, passing that callback's paint handle. To draw a texture, first call load_image outside paint. The id then stays loaded for the lifetime of the process. The build copies an image into the game folder only when its file or folder is listed in files on your operations.native entry, for example { "dll": "native/my_plugin.dll", "files": ["images"] }; see files in the game folder.

Example ​

To draw a translucent panel with a label in the safe area, register a callback like this:

cpp
#include <swofty/overlay.hpp>

namespace ov = swofty::overlay;

static void paint(SwoftyPaint *p, void *)
{
    float s = ov::ui_scale(p);
    ov::Rect safe = ov::safe_area(p);
    ov::Rect panel{safe.x, safe.y, 260 * s, 52 * s};
    ov::rect_rounded(p, panel.x, panel.y, panel.w, panel.h, 10 * s, 0x000000a0);
    ov::rect_rounded_outline(p, panel.x, panel.y, panel.w, panel.h, 10 * s, 2 * s, 0xff2d9affu);
    ov::TextStyle label;
    label.size = 24 * s;
    label.align = ov::align::center | ov::align::middle;
    ov::text_in(p, panel, label, "Swofty overlay");
}

SWOFTY_ON_LOAD
{
    if (ov::available())
        ov::on_paint(paint);
}

SWOFTY_ADDON()

Then name your plugin in operations.native and list the overlay in experimental_features:

json
"experimental_features": ["overlay"],
"operations": {
  "native": [{ "dll": "native/my_plugin.dll" }]
}

Availability ​

overlay is experimental. List it in your addon's swofty.json:

json
"experimental_features": ["overlay"]

While your addon is on, the build turns the overlay on for that profile, and the Addons page tags your addon Uses experimental features. Players install your addon and nothing else. This needs launcher 1.3.7 or later.

See feature gates.

The launcher can turn the overlay off for one addon: an addon id in "overlay_off" in swofty/assets.json gets false from available() and unavailable from on_paint, and the core skips its paint callbacks.

When the overlay draws ​

Paint callbacks run once per frame at Present, or at Present1 for a swapchain presented through it (XeSS frame generation presents that way). Where the swapchain is one the core can draw on, the overlay is drawn into its back buffer there. Where frame generation owns the swapchain, the overlay is drawn into the game's own back buffer in the command queue just after the game's list that moves it to PRESENT, so frame generation sees it and the generated frames carry it. That draw uses the callbacks' output from the previous Present, so the overlay is one frame late. The core decides at start: drawing before frame generation is on when the game's hardware_settings_config.xml has frame generation on. SWOFTY_OVERLAY_FG=0 or "overlay_fg": false in swofty/assets.json turns it off, and SWOFTY_OVERLAY_FG=1 or "overlay_fg": true turns it on whatever the game's setting. swofty/loader.log has an [overlay] line for each case, and one at start with the game's frame generation setting.

CaseOverlay
A swapchain the game created after the core loadedDraws, on the command queue the swapchain was created with
A swapchain the core never saw created, whose queue it reads at its first PresentDraws, on that queue
A swapchain the core never saw created that names no queue (DLSS Frame Generation and the NVIDIA app's present layer make these)Draws, on the direct queue that last ran ExecuteCommandLists on the presenting thread, from the frame after its first Present. The core's device hooks arm at that first Present when an NVIDIA module (NvPresent64.dll, nvngx_dlssg.dll, sl.dlss_g.dll or sl.interposer.dll) is loaded. It doesn't draw on it when FSR or XeSS frame generation presents it, with no NVIDIA module loaded, or with SWOFTY_OVERLAY_FG=0 / "overlay_fg": false
A swapchain that a frame generation module (DLSS Frame Generation, FSR or XeSS frame generation) created or presentsDraws into the game's back buffer (a resource named BackBuffer) before Present when frame generation was on in the game's settings at start
A swapchain created through Streamline's frame generation hook (sl.dlss_g.dll, every NVIDIA Streamline build of F1 25)Draws at Present while the game's hardware_settings_config.xml has frame_gen mode="0"; draws into the game's back buffer before Present once it reads anything else, when frame generation was on at start (otherwise it stops for the session)
Frame generation, and the back buffer is not a render target of the swapchain's size, or its queue is not a direct queue, or it is on another device than the overlay'sDoesn't draw; one [overlay] line says which
RivaTuner Statistics Server (it comes with MSI Afterburner) is running when the game startsDoesn't draw: the core leaves its Present hook off, available() returns false and on_paint returns unavailable. One [overlay] off: line names it. SWOFTY_OVERLAY_RIVAL=1 / "overlay_rival": true arms the hook anyway. Play warns first when rtss.exe is running and an addon that draws over the game is on: RivaTuner Statistics Server is running names the addons and says to exit it and MSI Afterburner from the system tray, or to add F1_25.exe in RivaTuner Statistics Server and set its Application detection level to None, with Play anyway; Windows only
The GPU still holds the previous frames' overlay workSkips drawing that frame
The GPU was removedStops for the rest of the session; an [overlay] line says how long after the overlay last drew

Colours are 0xRRGGBBAA in sRGB. On HDR output the core converts them, so overlay white matches the game's own HUD white (350 nits by default, SWOFTY_OVERLAY_NITS to change it):

Back bufferOutput
R10G10B10A2 with the HDR10 colour space (SetColorSpace1), or with no colour space set while the game's hardware_settings_config.xml has hdr mode above 0BT.2020 PQ
R16G16B16A16_FLOATLinear scRGB
Anything elsesRGB as given