MONKEY (gfx): separate fading foliage from downstream material markers

Move the foliage wind marker from bit 14 to bit 15 in its Rust producer and WGSL consumer so distance-fade twins cannot trigger a downstream fragment effect. Keep bit 14 reserved for those extensions.

Verified on Windows: cargo build -p benilla --profile play; cargo test -p benilla-app --lib (4313 passed, 0 failed, 10 ignored; no-install run). Public-base and fixed captures at the reported Elwynn position are pixel-identical; downstream integration still needs its in-game retest.

Co-Authored-By: GPT-6 Astra (Codex)
This commit is contained in:
pkuzic
2026-10-03 11:22:53 +01:00
co-authored by GPT-6 Astra (Codex)
parent 494d232c11
commit fbeb0f02f6
2 changed files with 6 additions and 5 deletions
@@ -1109,10 +1109,10 @@ fn vertex(vertex: WowVertex) -> WowVsOut {
}
#endif
// MONKEY (wind): a retained tree inside its fade band renders here with the same anchor/field
// maths, to avoid a pop. MONKEY (fix-wind): the leaf-batch marker is material bit 14
// maths, to avoid a pop. MONKEY (wind): the leaf-batch marker is material bit 15
// (`model_render::FOLIAGE_WIND_MARKER`), never a MeshTag bit (bit 18 aliases the lane weight
// and the interior probe slot, so doorway units and interior props swayed).
if ((u32(m.clutter_fade.z) & 16384u) != 0u && m.clutter_fade.w <= 0.5) {
if ((u32(m.clutter_fade.z) & 32768u) != 0u && m.clutter_fade.w <= 0.5) {
let world = p_cam + view.world_position;
p_cam += wind_hook::tree_offset(
world, frame_origin, view.world_position, wow_light.monkey
+4 -3
View File
@@ -488,11 +488,12 @@ pub(crate) const ENV_MAP_MARKER: u16 = 1 << 12;
/// vertex with no raster bias; a `WowModelKey` axis, so every other draw keeps its real depth.
pub(crate) const SKY_DEPTH_MARKER: u16 = 1 << 13;
/// MONKEY (fix-wind): `clutter_fade.z` marker bit 14: a classified tree/bush leaf batch's exile
/// MONKEY (wind): `clutter_fade.z` marker bit 15: a classified tree/bush leaf batch's exile
/// copy, the only entity draw `wow_model.wgsl` applies `tree_offset` to. Vertex-only uniform data,
/// not a `WowModelKey` axis. (It replaced MeshTag bit 18, which aliases the lane weight and the
/// interior probe slot, so doorway units and interior props swayed.)
pub(crate) const FOLIAGE_WIND_MARKER: u16 = 1 << 14;
/// interior probe slot, so doorway units and interior props swayed.) Bit 14 is reserved for
/// downstream material extensions; sharing it makes faded foliage take their fragment paths.
pub(crate) const FOLIAGE_WIND_MARKER: u16 = 1 << 15;
/// [`BATCH_ORDER_SORT_EPS`] for the WMO skybox lane: at the −6e4 rung the f32 ulp is 0.0039, so
/// 1e-3 would round away; this step is 4 ulps. Every skybox batch pair ties, being eye-anchored.