Reflections stand-in: opaque surfaces only; the alpha layer with VICTORY_AMBIENT_SPECULAR_ALPHA=1
Play session 2026-11-27 (open water, the stand-in running every frame once its tables were found): dark ragged patches lay on the water around a boat, following it. The alpha layer's rays are of transparent surfaces (glass, foam, wakes), but the depth the stand-in reads is the opaque one behind them: on water, the bottom. The normal and the reflected direction made of it are wrong and the estimate dark. The alpha layer is now left as the title has it (sky light), as water already was; VICTORY_AMBIENT_SPECULAR_ALPHA=1 puts it back for interiors. Counted with water on the 10-s line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
9b91d2782c
commit
9f6fb7790d
2 files changed
+10
-2
No files matched your search
@@ -655,7 +655,7 @@ pub(crate) fn note_miss(note: MissNote) {
|
||||
tracing::info!(
|
||||
"a stand-in for reflections (VICTORY_AMBIENT_SPECULAR={share},{sky}) in the last {:.0} s: \
|
||||
{} frames, {} dispatches of CS_RayMiss followed (surfaces: {}), each by an estimate along \
|
||||
the reflected direction put in right after it (before CS_ResolveScreenSpace); {} of water \
|
||||
the reflected direction put in right after it (before CS_ResolveScreenSpace); {} of water or the alpha layer \
|
||||
and {} before a frame's light was kept left as the title had them",
|
||||
now.duration_since(since).as_secs_f32(),
|
||||
s.frames.swap(0, Relaxed),
|
||||
|
||||
@@ -3786,7 +3786,15 @@ impl State {
|
||||
.unwrap_or(u32::MAX),
|
||||
_ => 0,
|
||||
};
|
||||
if role == Role::Miss && !matches!(layer, crate::ambient::MISS_OPAQUE | crate::ambient::MISS_ALPHA) {
|
||||
// The alpha layer only with VICTORY_AMBIENT_SPECULAR_ALPHA=1: its pixels
|
||||
// are of transparent surfaces (glass, foam, wakes on water) and the
|
||||
// depth read is the opaque one behind them; outdoors on water that is
|
||||
// the bottom, the reflected direction is wrong and the estimate dark
|
||||
// (play session 2026-11-27: dark patches on the water around a boat).
|
||||
let alpha_too = std::env::var("VICTORY_AMBIENT_SPECULAR_ALPHA").is_ok_and(|v| v.trim() == "1");
|
||||
if role == Role::Miss
|
||||
&& !(layer == crate::ambient::MISS_OPAQUE || (alpha_too && layer == crate::ambient::MISS_ALPHA))
|
||||
{
|
||||
crate::ambient::note_miss(MissNote::Water);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user