Advanced graphics: show when ray tracing is inactive (and why) + audit every control's enable/disable rules #483

Open
opened 2026-10-06 11:19:47 +00:00 by sky_line · 2 comments
Owner

Trigger (user report, 2026-10-06): in Advanced graphics, the projector shadows "Ray traced" option is greyed out, and RT shadow resolution is greyed and stuck at Full. Meanwhile, sun shadows still show "Ray traced" and reflection probes are set to ray traced.

Cause, from the code (llfloaterpreferencesgraphicsadvanced.cpp, refreshEnabledState, around lines 425–487): both controls are gated on LLVulkanContext::rayTracingEnabled(), so ray tracing isn't actually active at runtime. Sun shadows keep displaying "Ray traced" because the saved value is still 2; only that item is greyed, and the renderer falls back to shadow maps. Nothing in the panel says ray tracing is off. Likely reasons: RenderVKRayTracing is 0, no ray-query support, or the silent VRAM auto-off (#227). The projector combo's tooltip shows rayTracingStatus(), but nobody hovers there.

Part 1: the immediate fix

  • A visible status line in the Advanced panel's ray-tracing area: "Ray tracing: active", or "Ray tracing: off: " (from rayTracingStatus()), with a "turn back on" action when the reason is recoverable (VRAM auto-off → #227).
  • Don't show inactive "Ray traced" values as if they were running. When ray tracing is off, show the effective mode, e.g. "Ray traced (off: using shadow maps)", or a greyed indicator beside the combo. Never silently show a value that isn't in effect.
  • The same treatment for every ray-tracing consumer: sun shadows, projector shadows, reflection probes, RT reflections, RT budget/resolution.

Part 2: audit every control in the Advanced panel

Go through every control on every tab of the Advanced graphics floater (and the Quick Prefs and Lightbox equivalents where they duplicate settings). For each one, document and verify:

  • What it controls under Vulkan. If it's dead, remove it or wire it up (overlaps with #423, dead graphics controls).
  • When it should be enabled, as an explicit rule: depends on X (another setting), Y (GPU feature or capability), or Z (current runtime state, e.g. ray tracing active, upscaler active, TAA on). When it's disabled, the tooltip says why.
  • Whether the rule is re-evaluated on every relevant change. Hook every dependency's signal; don't rely only on the floater opening. A known past bug: projector shadows stayed greyed after raising Shadows, because the combo had no commit hook.
  • Effective vs. saved value: if the runtime overrides or degrades it (VRAM pressure ladder, ray tracing off, feature unsupported), show the effective state.
  • Presets and Quick Prefs don't leave controls in impossible combinations.

Deliverable: a table in this ticket (control → setting → depends on → enable rule → re-evaluated on → verified), fixes for every mismatch, and a short UI test pass:

  • toggling each dependency updates its dependents live;
  • low VRAM, no ray tracing, and an AMD card without ray queries are each simulated or tested.

Related: #227 (ray tracing silently turned off under low VRAM), #423 (dead graphics controls under Vulkan), #410 (Advanced graphics rework into tabs).

**Trigger (user report, 2026-10-06):** in Advanced graphics, the projector shadows **"Ray traced"** option is greyed out, and **RT shadow resolution** is greyed and stuck at Full. Meanwhile, sun shadows still *show* "Ray traced" and reflection probes are set to ray traced. **Cause, from the code** (`llfloaterpreferencesgraphicsadvanced.cpp`, `refreshEnabledState`, around lines 425–487): both controls are gated on `LLVulkanContext::rayTracingEnabled()`, so ray tracing isn't actually active at runtime. Sun shadows keep displaying "Ray traced" because the saved value is still 2; only that item is greyed, and the renderer falls back to shadow maps. Nothing in the panel says ray tracing is off. Likely reasons: `RenderVKRayTracing` is 0, no ray-query support, or the **silent VRAM auto-off (#227)**. The projector combo's tooltip shows `rayTracingStatus()`, but nobody hovers there. ## Part 1: the immediate fix - **A visible status line** in the Advanced panel's ray-tracing area: "Ray tracing: active", or "Ray tracing: off: <reason>" (from `rayTracingStatus()`), with a "turn back on" action when the reason is recoverable (VRAM auto-off → #227). - **Don't show inactive "Ray traced" values as if they were running.** When ray tracing is off, show the effective mode, e.g. "Ray traced (off: using shadow maps)", or a greyed indicator beside the combo. Never silently show a value that isn't in effect. - **The same treatment for every ray-tracing consumer:** sun shadows, projector shadows, reflection probes, RT reflections, RT budget/resolution. ## Part 2: audit every control in the Advanced panel Go through **every** control on every tab of the Advanced graphics floater (and the Quick Prefs and Lightbox equivalents where they duplicate settings). For each one, document and verify: - **What it controls under Vulkan.** If it's dead, remove it or wire it up (overlaps with #423, dead graphics controls). - **When it should be enabled, as an explicit rule**: depends on X (another setting), Y (GPU feature or capability), or Z (current runtime state, e.g. ray tracing active, upscaler active, TAA on). When it's disabled, the tooltip says why. - **Whether the rule is re-evaluated on every relevant change.** Hook every dependency's signal; don't rely only on the floater opening. A known past bug: projector shadows stayed greyed after raising Shadows, because the combo had no commit hook. - **Effective vs. saved value:** if the runtime overrides or degrades it (VRAM pressure ladder, ray tracing off, feature unsupported), show the effective state. - **Presets and Quick Prefs** don't leave controls in impossible combinations. **Deliverable:** a table in this ticket (control → setting → depends on → enable rule → re-evaluated on → verified), fixes for every mismatch, and a short UI test pass: - toggling each dependency updates its dependents live; - low VRAM, no ray tracing, and an AMD card without ray queries are each simulated or tested. Related: #227 (ray tracing silently turned off under low VRAM), #423 (dead graphics controls under Vulkan), #410 (Advanced graphics rework into tabs).
Author
Owner

Root cause for the reporter: RenderVKRayTracing = 0.

  • The only code that writes it is the device-lost "safer settings" offer (kGpuSafeSettings in llappviewer.cpp ~3945: RenderVKRayTracing → 0, plus async compute queue off and probe detail capped). It runs on the next launch after a device loss.
  • What most likely happened: the reporter was crashing from host-memory exhaustion (#458 / #462). AMD's Windows driver can surface that as a device loss. They accepted the offer.
  • There is no UI control bound to RenderVKRayTracing, so once it's switched off, only Debug Settings can turn it back on. Ray tracing stays off silently.

Add to this ticket's scope:

  1. A "Ray tracing" master toggle in Advanced graphics. The status line from part 1 names the reason, e.g. "off: turned off after a graphics crash", and offers Turn back on (restart required).
  2. Make the safer-settings offer specific. Only switch off what plausibly caused the loss; out-of-memory losses shouldn't switch off ray tracing. The notification must say plainly what will be turned off and how to undo it.
  3. Offer to undo after a few clean sessions: "Ray tracing was turned off after a crash. Turn it back on?"

User workaround: Debug Settings → RenderVKRayTracing = 1, then restart.

**Root cause for the reporter: `RenderVKRayTracing = 0`.** - **The only code that writes it** is the device-lost "safer settings" offer (`kGpuSafeSettings` in llappviewer.cpp ~3945: `RenderVKRayTracing → 0`, plus async compute queue off and probe detail capped). It runs on the next launch after a device loss. - **What most likely happened:** the reporter was crashing from host-memory exhaustion (#458 / #462). AMD's Windows driver can surface that as a device loss. They accepted the offer. - **There is no UI control bound to `RenderVKRayTracing`,** so once it's switched off, only Debug Settings can turn it back on. Ray tracing stays off silently. **Add to this ticket's scope:** 1. **A "Ray tracing" master toggle** in Advanced graphics. The status line from part 1 names the reason, e.g. "off: turned off after a graphics crash", and offers **Turn back on** (restart required). 2. **Make the safer-settings offer specific.** Only switch off what plausibly caused the loss; out-of-memory losses shouldn't switch off ray tracing. The notification must say plainly what will be turned off and how to undo it. 3. **Offer to undo** after a few clean sessions: "Ray tracing was turned off after a crash. Turn it back on?" **User workaround:** Debug Settings → `RenderVKRayTracing` = 1, then restart.
Author
Owner

Correction: this reporter is a different user from the #458 out-of-memory reporter.

What still holds:

  • The only code that writes RenderVKRayTracing = 0 is the device-lost safer-settings offer, after a device loss from any cause.
  • The default has always been 1.
  • Graphics presets, feature tables, the importer and first-run presets don't touch it.

So the likely causes are: they accepted that offer after a device loss, they set it by hand, or their settings were copied from another install.

To check: look for logs/slipstream_gpu_lost_last.txt, or "safer settings applied" in their log.

The scope additions above stand: a master toggle with the reason shown, a more specific offer, and a later offer to undo.

**Correction:** this reporter is a different user from the #458 out-of-memory reporter. What still holds: - The only code that writes `RenderVKRayTracing = 0` is the device-lost safer-settings offer, after a device loss from any cause. - The default has always been 1. - Graphics presets, feature tables, the importer and first-run presets don't touch it. So the likely causes are: they accepted that offer after a device loss, they set it by hand, or their settings were copied from another install. **To check:** look for `logs/slipstream_gpu_lost_last.txt`, or "safer settings applied" in their log. The scope additions above stand: a master toggle with the reason shown, a more specific offer, and a later offer to undo.
sky_line added this to the Slipstream project 2026-10-06 15:04:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#483
No description provided.