Add an experiment that turns the game's occlusion queries off, off by default.

The new patch set occlusion_off makes six reads of two parameter bytes read 0: CreateZPrePassOcclusionQuery and CreateSamplesPassedQuery, where the game first writes their options and where an update compares and stores them. The game is then left without its occlusion queries, their reports and the conditional renders that depend on them, and draws what it would have tested: more draws, and no query results to wait for.

patch_occlusion_off = 1 turns it on at the next start. The key has a row in the settings table, which gives the set its default, a section and an entry in nx2navi.ini.example. What it costs and saves in play has not been measured.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 15:11:15 -05:00
parent 2818857d1b
commit 495d118e9e
3 changed files with 31 additions and 2 deletions

View File

@@ -96,6 +96,12 @@
# Occlusion query results are read back from the video card in batches, 0 or 1. Default: on. 0 reads each query with a
# call of its own, as before, which on AMD's Windows driver held every frame's "GPU done" back by about 4 ms.
# oq_batch = 1
# EXPERIMENT, 0 or 1. Default: off. The game asks the video card how much of an object would show behind what is
# already drawn (an occlusion query) and leaves hidden objects out. With 1 it asks nothing and draws them all: more
# draws in a frame, and no queries to issue or results to wait for and read back. Whether that gains or loses frames
# has not been measured, and it differs from place to place. The log's "patches:" line at the start says
# "occlusion_off on" when the game was built with the patch set and the setting took effect.
# patch_occlusion_off = 0
# How many milliseconds a submit call waits for the game's own signal that the frame's data is written, when the
# frame's commands begin with a wait for that signal (0 to 100; 0: the frame is set aside at once and drawn at its
# present, as before).