From 721a1f7d19f0ddb5cd0e91c24936b2acff297f45 Mon Sep 17 00:00:00 2001 From: pkuzic Date: Fri, 25 Sep 2026 01:37:38 +0100 Subject: [PATCH] MONKEY (p0): THIRD-PARTY.md with the WarcraftXL credit table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One table of every WarcraftXL-derived file (Benilla file | WarcraftXL module | Source files | What was taken), pre-filled with the enhanced-water blocks and the swimmer bob, plus the planned ports. The standard header line ("Ported from WarcraftXL (https://github.com/WarcraftXL) by iThorgrim — module ..., ...") is added to enhanced_water.wgsl and water_fx/bob.rs. Linked from README, LIGHTING and WATER. WATER.md no longer says the WarcraftXL water module is for the 1.12 client: it is a 3.3.5a client module. Co-Authored-By: Claude Opus 5.5 --- LIGHTING.md | 3 +- README.md | 3 +- THIRD-PARTY.md | 38 +++++++++++++++++++ WATER.md | 10 +++-- .../src/shaders/enhanced_water.wgsl | 2 + crates/benilla-world/src/water_fx/bob.rs | 4 ++ 6 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 THIRD-PARTY.md diff --git a/LIGHTING.md b/LIGHTING.md index 0ffc9dea..bb879614 100644 --- a/LIGHTING.md +++ b/LIGHTING.md @@ -96,4 +96,5 @@ Debug tracing: `WOW_TORCH_TRACE=1`, `WOW_POINTS_DUMP=1`, `WOW_SHADOW_TRACE=1`, a ## Licence -Same as upstream: MIT OR Apache-2.0. +Same as upstream: MIT OR Apache-2.0. Code and techniques taken from other projects (WarcraftXL, +by iThorgrim) are credited file by file in [`THIRD-PARTY.md`](THIRD-PARTY.md). diff --git a/README.md b/README.md index 9d73c9d0..63e92bc2 100644 --- a/README.md +++ b/README.md @@ -89,4 +89,5 @@ adapters and developer frames, not copies of it. World of Warcraft is a trademark of Blizzard Entertainment, Inc. Our own code is licensed under [MIT](LICENSE-MIT) or [Apache 2.0](LICENSE-APACHE), at your option. The two vendored components under `third_party/` — the kira audio engine, and a Lua 5.1 patched to the 1.12 client's dialect — -keep their own upstream licenses, alongside each. +keep their own upstream licenses, alongside each. Code and techniques ported from other projects +(WarcraftXL, by iThorgrim) are credited file by file in [`THIRD-PARTY.md`](THIRD-PARTY.md). diff --git a/THIRD-PARTY.md b/THIRD-PARTY.md new file mode 100644 index 00000000..e3d23475 --- /dev/null +++ b/THIRD-PARTY.md @@ -0,0 +1,38 @@ +# Third-party credits + +Code and techniques this fork takes from other projects, with the files they landed in. Vendored +components under `third_party/` carry their own licences beside them and are listed in `README.md`. + +## WarcraftXL + +- **Project: [WarcraftXL](https://github.com/WarcraftXL)** — client extensions for the **3.3.5a** + (build 12340) client, written in C++ with D3D9 / HLSL. +- **Author: iThorgrim.** + +WarcraftXL's code is reused here on the condition that the author and the original project are +named. This file, and the header line in each file below, is that attribution; keep both wherever +the code is copied or shared. + +**Rule for contributors.** A file that ports code or a technique from WarcraftXL carries this line +in its header: + +``` +Ported from WarcraftXL (https://github.com/WarcraftXL) by iThorgrim — module , . +``` + +and gets a row in the table below. Blocks inside a file that port a specific routine also say so +where they stand. Do not remove either. + +| Benilla file | WarcraftXL module | Source files | What was taken | +|---|---|---|---| +| `crates/benilla-assets/src/shaders/enhanced_water.wgsl` (DEPTH LOOK block) | `wxl-experimental-water` | `shaders/Surface.ps.hlsl`, `render/Refraction.cpp` | Per-channel Beer-Lambert extinction over the view path through the water column, the body as a lerp from scattered colour to what is behind by the transmittance, normal-bent scene-copy refraction scaled by the water depth (ported) | +| `crates/benilla-assets/src/shaders/enhanced_water.wgsl` (caustics) | `wxl-experimental-water` | `shaders/Surface.ps.hlsl`, `render/Noise.cpp` | Two caustic layers at incommensurate scales and rates, multiplied (ported; our layers are built from animated cell edges, not value noise) | +| `crates/benilla-assets/src/shaders/enhanced_water.wgsl` (HIGH reflections) | `wxl-experimental-water` | `shaders/Surface.ps.hlsl` | Screen-space reflection of the scene copy along an almost-planar normal, masked by the screen edge and by rays turning back toward the eye (principle; ours is a bisected march against the scene depth, not a single probe) | +| `crates/benilla-assets/src/shaders/enhanced_water.wgsl` (beach surf, `on_bed`) | `wxl-experimental-water` | `sea/Shore.hpp`, `shaders/Shore.hlsli` | Shore surf limited by the terrain column, so objects standing in the water never foam (principle) | +| `crates/benilla-world/src/water_fx/bob.rs` | `wxl-experimental-water` | `world/Ride.cpp` | Visual-only wave riding for swimmers; the authoritative position never moves (principle, implemented independently) | + +Planned (not yet in the tree): Gerstner trains, breaker index and crest-fold foam from +`sea/Spectrum.*`, `sea/Shore.hpp`, `shaders/Wave.hlsli`; grass wind from `wxl-experimental-wind` +(`field/Wind.*`, `grass/GrassWind.*`); colour grading from `wxl-retail-grading` +(`Grading.*`, `shaders/Grading.ps.hlsl`); cloud sheets from `wxl-retail-clouds` (`Clouds.*`). +The lane that ports one adds its row here. diff --git a/WATER.md b/WATER.md index 9ee06550..06061c30 100644 --- a/WATER.md +++ b/WATER.md @@ -12,7 +12,8 @@ player picks it, and every part of it can be switched off. ## Credits - **Original project: [WarcraftXL](https://github.com/WarcraftXL)** — the `wxl-experimental-water` - module for the 1.12 client. + module, a client extension for the 3.3.5a (build 12340) client (C++ / D3D9 / HLSL), used here as + reference code and ported to WGSL/Rust for the 1.12 renderer. - **Author: iThorgrim.** The WarcraftXL water module is the design reference for this one, and its author has given @@ -21,8 +22,11 @@ named. This section is that attribution; it must travel with the module (this fi `enhanced_water.wgsl` header) wherever the module is copied or shared. Rule for contributors: a file that ports code or a technique from WarcraftXL says so in its header -(`Portions derived from WarcraftXL wxl-experimental-water by iThorgrim, used with permission`) and -the technique is listed in the table below. Do not remove either. +(`Ported from WarcraftXL (https://github.com/WarcraftXL) by iThorgrim — module , .`; blocks inside a file keep their `Portions derived from WarcraftXL ...` line), the +technique is listed in the table below, and the file is listed in +[`THIRD-PARTY.md`](THIRD-PARTY.md), the one table of every WarcraftXL-derived file across the +fork. Do not remove any of them. | Technique | Status here | From WarcraftXL | |---|---|---| diff --git a/crates/benilla-assets/src/shaders/enhanced_water.wgsl b/crates/benilla-assets/src/shaders/enhanced_water.wgsl index 95eb1183..80d54670 100644 --- a/crates/benilla-assets/src/shaders/enhanced_water.wgsl +++ b/crates/benilla-assets/src/shaders/enhanced_water.wgsl @@ -6,6 +6,8 @@ // author iThorgrim. Its author permits reuse of that code in this module provided the author and // the original project are named; this notice is that attribution and must stay with the module. // A block that ports WarcraftXL code says so where it stands and is listed in WATER.md. +// Ported from WarcraftXL (https://github.com/WarcraftXL) by iThorgrim — module wxl-experimental-water, shaders/Surface.ps.hlsl, render/Refraction.cpp, render/Noise.cpp, sea/Shore.hpp. +// MONKEY (p0 credits): every WarcraftXL-derived file is listed in THIRD-PARTY.md (benilla root). // // This file is the whole module on the shader side. `liquid.wgsl` (upstream's liquid renderer) // carries three hooks only: the import, `water_swell` in its vertex stage, and a branch at the top diff --git a/crates/benilla-world/src/water_fx/bob.rs b/crates/benilla-world/src/water_fx/bob.rs index 4255aae8..6f53ea25 100644 --- a/crates/benilla-world/src/water_fx/bob.rs +++ b/crates/benilla-world/src/water_fx/bob.rs @@ -1,6 +1,10 @@ //! MONKEY (swim waves) — **bodies ride the swell**: the visual-only vertical bob (and the small //! lean into the wave slope) every swimming or floating unit takes on Enhanced water. //! +//! Ported from WarcraftXL (https://github.com/WarcraftXL) by iThorgrim — module wxl-experimental-water, world/Ride.cpp. +//! (The principle — the authoritative position never moves — implemented independently; listed in +//! `THIRD-PARTY.md`.) +//! //! The defect this closes is a mismatch, not a missing effect. Enhanced water heaves the ocean //! MESH in the vertex stage ([`crate::liquid::waves`] mirrors the exact band), while every body in //! it is placed at the height the CPU queries — the flat MCLQ heightfield, which knows nothing