Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions crates/victory-gpu/src/ambient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ void raise(uint3 at : SV_DispatchThreadID) {
found = all + 1.2 * float3(dot(sr.xyz, n), dot(sg.xyz, n), dot(sb.xyz, n)) / sum;
found = clamp(found, 0.2 * all, 2.5 * all);
found = lerp(found, cells[CELLS].rgb, 0.2) * level * open;
found = (isnan(found) || isinf(found)) ? 0.0 : max(found, 0.0);
float3 was = unpack(light[p]);
was = (isnan(was) || isinf(was)) ? 0.0 : max(was, 0.0);
// Magenta/violet garbage the probes' memory held (green far under red and
// blue): dropped, as VIctory-Belobug-AMD does (ambient.rs, "Filter magenta
// garbage probes"). Seen on an RTX 5080 as a purple-blue glow on a lit
Expand Down Expand Up @@ -850,6 +852,18 @@ mod tests {
assert_eq!(settle(0.8, 0.6, &[1.0, 1.0], true), vec![1.0, 1.0]);
}

/// A single NaN, Inf, or negative channel is scrubbed without zeroing
/// the remaining valid channels.
#[test]
fn scrub_channel_keeps_valid_channels() {
let scrub = |v: [f32; 3]| -> [f32; 3] {
v.map(|c| if c.is_nan() || c.is_infinite() { 0.0 } else { c.max(0.0) })
};
assert_eq!(scrub([f32::NAN, 0.4, 0.8]), [0.0, 0.4, 0.8]);
assert_eq!(scrub([0.3, f32::INFINITY, 0.7]), [0.3, 0.0, 0.7]);
assert_eq!(scrub([0.2, -0.5, 0.9]), [0.2, 0.0, 0.9]);
}

/// The passes compile with the system's compiler and the host takes them.
#[test]
fn the_passes_build() {
Expand Down
8 changes: 5 additions & 3 deletions scripts/play-foxhound.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ $settings = @{
VICTORY_WC_NO_BACK = '1'; VICTORY_WC_NO_BACK_MIN_KB = '1024'
# The title's page-mapping copies kept without Windows views (no cutscene freezes at scene cuts)
VICTORY_SOFT_VIEWS = 'copies'
# Textures: pool with no blocks made ahead, 16 ms a pass, no catch-up, levels not on demand (sharp)
# Textures: pool with no blocks made ahead, 32 ms a pass, no catch-up, levels not on demand (sharp)
VICTORY_TEXTURE_POOL = '1'; VICTORY_RIPE_BLOCKS = '0'; VICTORY_TEXTURE_NO_WAIT = '1'; VICTORY_TEXTURE_CATCHUP = '0'
VICTORY_TEXTURE_STAGE_MS = '16'; VICTORY_LEVELS_ON_DEMAND = '0'
VICTORY_TEXTURE_STAGE_MS = '32'; VICTORY_LEVELS_ON_DEMAND = '0'
VICTORY_PRELUDE_UPLOADS = '1'; VICTORY_SHOW_NEW_LATER = '1'; VICTORY_POOL_SMALL = '0'; VICTORY_TABLED_REREAD = '1'
VICTORY_QUEUE_HOST_TEXTURES = '0'
# Descriptor heaps' records
Expand Down Expand Up @@ -109,7 +109,9 @@ if ($Dlss -ne 'off') {
# Frame generation takes 1.5 to 2 GB of the card's memory, which the layer otherwise fills with textures up
# to nine tenths of its budget (on a 12 GB card it then ran out: no generated frames). On from the start, it
# is left a fifth of the budget; ready but off, a little less is held back.
if ($settings.VICTORY_FRAMEGEN -eq '1') { $settings.VICTORY_TEXTURE_ROOM_PERCENT = if ($FrameGen) { '80' } else { '86' } }
if ($settings.VICTORY_FRAMEGEN -eq '1') {
$settings.VICTORY_TEXTURE_ROOM_PERCENT = if ($FrameGen -and $timesWanted -gt 2) { '74' } elseif ($FrameGen) { '80' } else { '86' }
}
} else {
Write-Host "No NVIDIA files in ${sl}: running without DLSS and frame generation. Get-NVIDIA-DLSS.cmd in the"
Write-Host "repository folder fetches them from NVIDIA once (about 70 MB); VICTORY_STREAMLINE_DIR names another folder."
Expand Down