aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-render/src
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-01 11:30:17 +0300
committerValentin Popov <valentin@popov.link>2026-11-01 11:30:17 +0300
commit923ef2aad6b7284d745756d938b90965bb92a110 (patch)
tree2f84de40eaae84c148c1c601f759740f07755ab4 /crates/fparkan-render/src
parent9533c1a927ec26aced3a9b80ce385c0774cbadbe (diff)
downloadfparkan-923ef2aad6b7284d745756d938b90965bb92a110.tar.xz
fparkan-923ef2aad6b7284d745756d938b90965bb92a110.zip
fix(render): match native packet distance approximation
Diffstat (limited to 'crates/fparkan-render/src')
-rw-r--r--crates/fparkan-render/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/fparkan-render/src/lib.rs b/crates/fparkan-render/src/lib.rs
index db0171f..80193c7 100644
--- a/crates/fparkan-render/src/lib.rs
+++ b/crates/fparkan-render/src/lib.rs
@@ -382,8 +382,9 @@ pub enum LegacyCullMode {
/// CPU diffuse alpha for a colourless MSH batch carrying flag `0x0008`.
///
-/// `packet_distance` is the distance to the packet's first accepted vertex,
-/// after its object transform. Flag `0x0010` takes precedence over `0x0040`.
+/// `packet_distance` is the native distance to the input packet's first indexed
+/// vertex after its object transform, even when that vertex is outside the
+/// viewport. Flag `0x0010` takes precedence over `0x0040`.
/// Returns `None` for invalid distance or projection inputs. Callers must keep
/// the material alpha for batches with a type-16 colour stream or without `0x0008`.
#[must_use]