Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
|
Nice |
|
Claimed |
|
I'm taking this one for review. |
Small scenes built in code whose correct map values follow in closed form: AO and bent normals beside a wall and inside an open box (lune solid angle, view factors, vector irradiance), height of a step and a spherical cap, tangent-space normals of a tilted plane in three UV layouts, world normal and position, slab thickness, opacity of a hole with 4x4 antialiasing, padding between two islands, and a UV seam. A normal-map round trip bakes a bumpy sphere and decodes every texel the way the viewport does (shade_mesh frame, 8-bit display packing, snorm8), comparing with the high-poly normal the transfer ray hit. The scenes take the tracer as a parameter: crates/bake/tests/reference.rs runs them on the CPU, and the render crate includes the same file to run them on the GPU tracer. An engine test checks the exported normal of a tilted high poly in both OpenGL and DirectX. mixed_tangent_signs_decode_like_the_viewport is ignored: the bake takes a triangle's first-vertex bitangent sign, the viewport interpolates it, and compute_tangents keeps one tangent per vertex, so two triangles meeting at a vertex with mirrored UVs decode up to 40.7 degrees off. It passes with the per-corner tangent sign fix.
abbbcec to
b101fa1
Compare
|
Review notes (prepared with Claude Code) PR #279Verdict: merge after a small rework. Analytic expectations are what the baker has been missing. I re-derived each one independently and they are correct, the suite is deterministic and fast, and it catches baker bugs the 65 existing unit tests miss. What I checked
Changes requested
Suggestions
Notes
Patch 1: per-case thickness tolerance and doc commentsThe changes described above, as a patch you can apply ( Show the patchFrom 60dff5dac7f15b3a8cb657439979af0ae7518045 Mon Sep 17 00:00:00 2001
From: SteamSmith <341182916+SteamSmith@users.noreply.github.com>
Date: Tue, 10 Nov 2026 07:06:41 -0500
Subject: [PATCH] test(#279): per-case thickness tolerance, doc comments on
helpers
The slab thickness tolerance used the 120-degree cone's cosine for every
case, so the two hemisphere cases bounded a ray's distance by [T, 2T]
instead of [T, D] and their "4 sigma" was about 1 sigma of the bound
(0.0023 instead of 0.0091). Use each case's own half angle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---
crates/bake/tests/reference.rs | 14 ++++++++++++++
crates/bake/tests/reference_scenes/mod.rs | 18 ++++++++++++++++--
crates/render/src/gpu_reference.rs | 2 ++
3 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/crates/bake/tests/reference.rs b/crates/bake/tests/reference.rs
index d0bb814..2b7e6ee 100644
--- a/crates/bake/tests/reference.rs
+++ b/crates/bake/tests/reference.rs
@@ -4,71 +4,85 @@ mod reference_scenes;
use texturecraft_bake::tracing::CpuTracer;
+/// Run the reference check `name` on the CPU tracer
fn run(name: &str) {
let (_, check) = reference_scenes::CHECKS.iter().find(|(check, _)| *check == name).unwrap();
check(&CpuTracer);
}
+/// The `occlusion_beside_a_wall` reference scene on the CPU tracer
#[test]
fn occlusion_beside_a_wall() {
run("occlusion_beside_a_wall");
}
+/// The `occlusion_inside_an_open_box` reference scene on the CPU tracer
#[test]
fn occlusion_inside_an_open_box() {
run("occlusion_inside_an_open_box");
}
+/// The `height_of_a_step` reference scene on the CPU tracer
#[test]
fn height_of_a_step() {
run("height_of_a_step");
}
+/// The `height_of_a_spherical_cap` reference scene on the CPU tracer
#[test]
fn height_of_a_spherical_cap() {
run("height_of_a_spherical_cap");
}
+/// The `tangent_normal_of_a_tilted_plane` reference scene on the CPU tracer
#[test]
fn tangent_normal_of_a_tilted_plane() {
run("tangent_normal_of_a_tilted_plane");
}
+/// The `world_normal_and_position` reference scene on the CPU tracer
#[test]
fn world_normal_and_position() {
run("world_normal_and_position");
}
+/// The `thickness_of_a_slab` reference scene on the CPU tracer
#[test]
fn thickness_of_a_slab() {
run("thickness_of_a_slab");
}
+/// The `opacity_of_a_hole` reference scene on the CPU tracer
#[test]
fn opacity_of_a_hole() {
run("opacity_of_a_hole");
}
+/// The `normal_map_round_trip` reference scene on the CPU tracer
#[test]
fn normal_map_round_trip() {
run("normal_map_round_trip");
}
+/// The `normal_map_round_trip_with_mirrored_uvs` reference scene on the CPU tracer
#[test]
fn normal_map_round_trip_with_mirrored_uvs() {
run("normal_map_round_trip_with_mirrored_uvs");
}
+/// The `padding_fills_each_gutter_from_the_nearest_island` reference scene on the CPU tracer
#[test]
fn padding_fills_each_gutter_from_the_nearest_island() {
run("padding_fills_each_gutter_from_the_nearest_island");
}
+/// The `tangent_normals_agree_across_a_uv_seam` reference scene on the CPU tracer
#[test]
fn tangent_normals_agree_across_a_uv_seam() {
run("tangent_normals_agree_across_a_uv_seam");
}
+/// The mixed-sign reference scene on the CPU tracer
#[test]
#[ignore = "fails until the per-corner tangent sign fix: compute_tangents keeps one tangent per vertex, so mirrored UVs meeting at a vertex mix bitangent signs in a triangle"]
fn mixed_tangent_signs_decode_like_the_viewport() {
diff --git a/crates/bake/tests/reference_scenes/mod.rs b/crates/bake/tests/reference_scenes/mod.rs
index 9a8f096..3202742 100644
--- a/crates/bake/tests/reference_scenes/mod.rs
+++ b/crates/bake/tests/reference_scenes/mod.rs
@@ -44,6 +44,7 @@ pub const CHECKS: [(&str, Check); 12] = [
// ---------------------------------------------------------------------------------------------
// Baking and sampling helpers
+/// Bake settings at `resolution`² for `maps`, with no dilation or diffusion so every texel is a raw bake value
fn settings(resolution: u32, antialiasing: BakeAntialiasing, maps: &[BakedMap]) -> BakeSettings {
let mut settings = BakeSettings::default();
settings.common.resolution = BakeResolution::from_pixels(resolution).unwrap();
@@ -66,6 +67,7 @@ fn cage(settings: &mut BakeSettings, frontal: f32, rear: f32) {
settings.cage.relative_to_bounding_box = false;
}
+/// Bake `low` (and `high`, if any) on `tracer`, failing if the tracer fell back to the CPU
fn bake_with(tracer: &dyn Tracer, low: &Mesh, high: Option<&Mesh>, settings: &BakeSettings) -> BakeOutput {
let low_bvh = Bvh::new(low);
let high_bvh = high.map(Bvh::new);
@@ -87,15 +89,18 @@ struct Texel {
}
impl Texel {
+ /// Mean of `value` over the texel's covered subsamples
fn mean(&self, value: impl Fn(&Surface) -> f32) -> f32 {
self.surfaces.iter().map(value).sum::<f32>() / self.surfaces.len() as f32
}
+ /// Mean of the vector `value` over the texel's covered subsamples
fn mean_vector(&self, value: impl Fn(&Surface) -> Vec3) -> Vec3 {
self.surfaces.iter().map(value).sum::<Vec3>() / self.surfaces.len() as f32
}
}
+/// Every texel of material 0 that has at least one covered subsample, with those subsamples' surfaces
fn texels(mesh: &Mesh, resolution: u32, antialiasing: BakeAntialiasing) -> Vec<Texel> {
let (size, per_axis) = (resolution as usize, antialiasing.samples_per_axis() as usize);
let fine = UvGBuffer::new(mesh, 0, (size * per_axis) as u32, (size * per_axis) as u32);
@@ -110,22 +115,27 @@ fn texels(mesh: &Mesh, resolution: u32, antialiasing: BakeAntialiasing) -> Vec<T
.collect()
}
+/// The first component of `map` at texel `index`
fn scalar(output: &BakeOutput, map: BakedMap, index: usize) -> f32 {
output.maps[&map][index * map.components()]
}
+/// The three components of `map` at texel `index`
fn vector(output: &BakeOutput, map: BakedMap, index: usize) -> Vec3 {
Vec3::from_slice(&output.maps[&map][index * 3..index * 3 + 3])
}
+/// A packed 0..1 vector back in −1..1
fn unpack(packed: Vec3) -> Vec3 {
packed * 2.0 - Vec3::ONE
}
+/// A −1..1 vector packed into 0..1, as the baker stores normals
fn pack(normal: Vec3) -> Vec3 {
normal * 0.5 + Vec3::splat(0.5)
}
+/// The angle between two directions, in degrees
fn degrees_between(a: Vec3, b: Vec3) -> f32 {
a.normalize().dot(b.normalize()).clamp(-1.0, 1.0).acos().to_degrees()
}
@@ -281,6 +291,7 @@ pub fn occlusion_beside_a_wall(tracer: &dyn Tracer) {
/// Floor `-1..1` square (baked) inside four walls of height `BOX_HEIGHT` facing inwards, no lid
const BOX_HEIGHT: f32 = 1.0;
+/// The open box scene: the floor (material 0) and its four walls (material 1)
fn open_box() -> Mesh {
let mut mesh = floor([-1.0, 1.0], [-1.0, 1.0], 0.0, |x, z| Vec2::new((x + 1.0) * 0.5, (z + 1.0) * 0.5));
let h = BOX_HEIGHT;
@@ -368,6 +379,7 @@ pub fn occlusion_inside_an_open_box(tracer: &dyn Tracer) {
// ---------------------------------------------------------------------------------------------
// Height
+/// Height-map settings with `normalization` and a scaling divisor of 1
fn height_settings(resolution: u32, normalization: HeightNormalization) -> BakeSettings {
let mut settings = settings(resolution, BakeAntialiasing::None, &[BakedMap::Height]);
settings.maps.height.parameters.normalization = normalization;
@@ -515,8 +527,10 @@ pub fn thickness_of_a_slab(tracer: &dyn Tracer) {
settings.maps.thickness.parameters.self_occlusion = SelfOcclusion::Always;
let output = bake_with(tracer, &slab, None, &settings);
let measured = top.iter().map(|t| scalar(&output, BakedMap::Thickness, t.index)).sum::<f32>() / top.len() as f32;
- // A ray's distance lies in [T, min(T / C, D)]: variance ≤ (range / 2)²
- let range = (T / cone.max(T / max_distance)).min(max_distance) - T;
+ // A ray's distance lies in [T, min(T / C, D)], C the cosine of this case's half angle
+ // (0 for the hemisphere, where the cap D bounds it): variance ≤ (range / 2)²
+ let case_cone = (spread * 0.5f32).to_radians().cos();
+ let range = (T / case_cone.max(T / max_distance)).min(max_distance) - T;
let tolerance = four_sigma((range * 0.5).powi(2), RAYS as usize * top.len());
eprintln!("slab thickness, {spread}° {distribution:?}: {measured:.4} vs {expected:.4} (±{tolerance:.4}) over {} texels", top.len());
assert!((measured - expected).abs() < tolerance, "slab thickness {spread}° {distribution:?}: {measured} vs {expected}");
diff --git a/crates/render/src/gpu_reference.rs b/crates/render/src/gpu_reference.rs
index 60e167b..833d1b9 100644
--- a/crates/render/src/gpu_reference.rs
+++ b/crates/render/src/gpu_reference.rs
@@ -39,6 +39,7 @@ fn gpu() -> Option<GpuBaker> {
}
}
+/// Every reference scene on the GPU tracer (skipped without an adapter)
#[test]
fn gpu_bakes_the_reference_scenes() {
let Some(gpu) = gpu() else { return };
@@ -48,6 +49,7 @@ fn gpu_bakes_the_reference_scenes() {
}
}
+/// The mixed-sign reference scene on the GPU tracer
#[test]
#[ignore = "fails until the per-corner tangent sign fix: compute_tangents keeps one tangent per vertex, so mirrored UVs meeting at a vertex mix bitangent signs in a triangle"]
fn gpu_mixed_tangent_signs_decode_like_the_viewport() {
--
2.55.0.windows.5Patch 2: partly covered texels scene (apply after patch 1)The changes described above, as a patch you can apply ( Show the patchFrom bbbfaa8086665d2c8d9295077048ab7f846135f9 Mon Sep 17 00:00:00 2001
From: SteamSmith <341182916+SteamSmith@users.noreply.github.com>
Date: Tue, 10 Nov 2026 10:42:16 -0500
Subject: [PATCH] test(#279): partly covered texels average only their covered
subsamples
No reference scene had an island edge inside a texel under antialiasing,
so a bake that divided each texel by all of its subsamples instead of
the covered ones passed every scene and every bake unit test. An island
inset by a quarter texel at 4x4 antialiasing gives 124 partly covered
border texels whose world normal must still read exactly +y.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---
crates/bake/tests/reference.rs | 6 ++++++
crates/bake/tests/reference_scenes/mod.rs | 25 ++++++++++++++++++++++-
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/crates/bake/tests/reference.rs b/crates/bake/tests/reference.rs
index 2b7e6ee..f6a5afd 100644
--- a/crates/bake/tests/reference.rs
+++ b/crates/bake/tests/reference.rs
@@ -82,6 +82,12 @@ fn tangent_normals_agree_across_a_uv_seam() {
run("tangent_normals_agree_across_a_uv_seam");
}
+/// Texels on an island's border average only the subsamples the island covers
+#[test]
+fn partly_covered_texels_average_only_their_covered_subsamples() {
+ run("partly_covered_texels_average_only_their_covered_subsamples");
+}
+
/// The mixed-sign reference scene on the CPU tracer
#[test]
#[ignore = "fails until the per-corner tangent sign fix: compute_tangents keeps one tangent per vertex, so mirrored UVs meeting at a vertex mix bitangent signs in a triangle"]
diff --git a/crates/bake/tests/reference_scenes/mod.rs b/crates/bake/tests/reference_scenes/mod.rs
index 3202742..448392c 100644
--- a/crates/bake/tests/reference_scenes/mod.rs
+++ b/crates/bake/tests/reference_scenes/mod.rs
@@ -26,7 +26,7 @@ use texturecraft_geom::{Bvh, Mesh, Surface, UvGBuffer, primitives, surface_at};
pub type Check = fn(&dyn Tracer);
/// Every check, by name, for the tracer-parameterized runners.
-pub const CHECKS: [(&str, Check); 12] = [
+pub const CHECKS: [(&str, Check); 13] = [
("occlusion_beside_a_wall", occlusion_beside_a_wall),
("occlusion_inside_an_open_box", occlusion_inside_an_open_box),
("height_of_a_step", height_of_a_step),
@@ -39,6 +39,7 @@ pub const CHECKS: [(&str, Check); 12] = [
("normal_map_round_trip_with_mirrored_uvs", normal_map_round_trip_with_mirrored_uvs),
("padding_fills_each_gutter_from_the_nearest_island", padding_fills_each_gutter_from_the_nearest_island),
("tangent_normals_agree_across_a_uv_seam", tangent_normals_agree_across_a_uv_seam),
+ ("partly_covered_texels_average_only_their_covered_subsamples", partly_covered_texels_average_only_their_covered_subsamples),
];
// ---------------------------------------------------------------------------------------------
@@ -566,6 +567,28 @@ pub fn opacity_of_a_hole(tracer: &dyn Tracer) {
}
}
+/// An island whose edges sit a quarter texel inside the texel grid, so its border texels are
+/// covered by 3 of 4 subsample columns (or rows) at 4 × 4 antialiasing and its corners by 9 of
+/// 16. The world normal is +y everywhere on it, so every covered texel, partial ones included,
+/// must read exactly `pack(+y)`: a texel averages its covered subsamples, not all 16.
+pub fn partly_covered_texels_average_only_their_covered_subsamples(tracer: &dyn Tracer) {
+ const SIZE: u32 = 32;
+ // A quarter texel: between the subsample centres at 1/8 and 3/8 of a texel
+ let inset = 0.25 / SIZE as f32;
+ let low =
+ floor([-1.0, 1.0], [-1.0, 1.0], 0.0, |x, z| Vec2::new(inset + (x + 1.0) * 0.5 * (1.0 - 2.0 * inset), inset + (z + 1.0) * 0.5 * (1.0 - 2.0 * inset)));
+ let antialiasing = BakeAntialiasing::Subsampling4x4;
+ let output = bake_with(tracer, &low, None, &settings(SIZE, antialiasing, &[BakedMap::WorldNormal]));
+ let texels = texels(&low, SIZE, antialiasing);
+ let partial = texels.iter().filter(|t| t.surfaces.len() < 16).count();
+ let worst = texels.iter().map(|t| (vector(&output, BakedMap::WorldNormal, t.index) - pack(Vec3::Y)).abs().max_element()).fold(0.0, f32::max);
+ eprintln!("partly covered texels: {partial} of {}, worst error {worst:.2e}", texels.len());
+ // Every border texel of the 32 × 32 grid is partly covered
+ assert_eq!(partial, 4 * (SIZE as usize - 1), "partly covered texels");
+ // Averaging identical packed normals: exact up to single-precision rounding
+ assert!(worst < 1e-6, "partly covered texels read {worst} off the island's normal");
+}
+
// ---------------------------------------------------------------------------------------------
// Normal-map round trip: bake, then decode as the viewport does
--
2.55.0.windows.5🤖 Generated with Claude Code |
The slab thickness tolerance used the 120-degree cone's cosine for every case, so the two hemisphere cases bounded a ray's distance by [T, 2T] instead of [T, D]: 0.0023 instead of 0.0091 over the 240 top texels. Use each case's own half angle. Document every helper and test runner, and move the open box's description from BOX_HEIGHT onto open_box.
…ed subsamples No reference scene had an island edge inside a texel under antialiasing, so a bake that divided each texel by all of its subsamples instead of the covered ones passed every scene. An island inset by a quarter texel at 4x4 antialiasing gives 124 partly covered border texels whose world normal must still read exactly +y; with that mutant they read 0.4375 off, on the CPU and the GPU.
The probe turned any GPU bake error into a skip, so a WGSL compile error in bake.wgsl made the GPU reference test print "skipping" and pass. Ask for the adapter the way the GPU baker does and skip only when there is none or it is a software renderer; otherwise a bake that falls back to the CPU fails the test.
… components The note said the 8-bit display path puts each component at most 0.0079 off, which holds only for components >= 0: the error is (1 - c/2) / 127, up to 0.0118 as c falls towards -1, so the asserted 0.8-degree maximum was not backed by the derivation. Bound the transverse components by the sine of the measured bump tilt and z by its cosine, derive the maximum angle from that (0.80 degrees here, measured 0.67 and 0.68), and say that the p50, p99 and float limits are fitted to measurements. Note that viewport_tangent_normal models the display packing from before storytold#278, by copying it.
…in the seam budget The opacity scene printed its partly covered texels but asserted none: require the 46 border texels of the hole at 4x4 antialiasing and none without it. The seam's 5-degree world-normal budget holds because the theta and y errors turn the normal about perpendicular axes (4.5 degrees, not their 6.1-degree sum); say so.
|
Thanks @SteamSmith, the re-derivations and the mutation runs are a great help. I've pushed five commits (4385f9c..ead2b70):
Left for now: tighter tolerances from a measured error envelope, expectations computed without I ran |
Main bakes bent normal maps in tangent space, like the normal map (storytold#542). The occlusion scenes now read the baked bent normal through their floors' tangent frame before comparing it with the analytic world direction; the largest error is 0.04 degrees against tolerances of about 2.5.
What
A correctness suite for the mesh-map baker. The roadmap says baking accuracy is unverified, and that Height, Bent Normal and Opacity in particular need reference validation. These tests build small scenes in code where the correct map values follow in closed form, so they fail when the baker is wrong, not just when its output changes. They are meant to back the baker speedups (#195, #196) and any later ones.
crates/bake/tests/reference_scenes/mod.rsholds the scenes, derivations and checks. Each check takes the tracer as a parameter.crates/bake/tests/reference.rsruns them on the CPU tracer, one test per scene.crates/render/src/gpu_reference.rsincludes the same file (#[path]) and runs every check on the GPU tracer. Without an adapter it skips, the same waygpu_bake_matches_the_cpudoes.crates/engine/tests/bake.rsgains an end-to-end check of the exported normal in both formats.Monte Carlo tolerances are 4σ of the mean, from a bound on the per-ray variance times the rays averaged. Each tolerance's reasoning is in a comment next to it. The tolerances assume only the configured rays per texel, so they hold whether antialiasing repeats rays per subsample (main) or splits them (#196). All tests are fast: the CPU file runs in about 0.3 s in release, and the GPU run in about 0.7 s.
Scenes and expected values
1 − β/π, cosine(1 + cos β)/2,β = atan(h/d)(lune solid angle and view factor)(−sin²β, π − β + ½ sin 2β)normalized0.5 + h; ray distances0.5 + h/(f + r); min/max 1 and 0√(1 − r²) − 0.8(n·T, n·B, n·N), T along +u, B up the image(p − min)/(max − min), averaged over 2×2 subsamplesT ln(1/C)/(1 − C),2T/(1 + C),T(1 + ln(D/T)),2T − T²/D(n·x, −n·z, n·y), DirectX(n·x, n·z, n·y)Normal-map round trip
A 32 × 16 UV sphere baked at 256² from a bumpy sphere (bump tilt p50 6.0°, max 14.7°). Every texel is decoded the way the viewport does: the
shade_meshframe (interpolated normal, tangent made orthogonal,cross(n, t) · wwith interpolated w), the display's 8-bit packing (core::blend::rnmonto a flat detail,(v · 255 + 0.5) as u8) and the shader'ssnorm8. The result is compared with the high-poly normal the transfer ray hit, found by casting the same ray independently.The mirrored-UV sphere (bitangent sign −1 everywhere) gives the same numbers (8-bit max 0.681°). The bake and the viewport agree on the frame, the bitangent sign and the OpenGL green, except for the case below.
Results
main(6cceef1): all pass on the CPU and on the GPU tracer (Apple M3 Pro). The two tracers agree to the printed digit on every scene.main0.03°). The open-box uniform bent normals move from 0.00–0.05° to 0.07–0.16° (inside their tolerance).main(it changes only the display path).cargo +1.96.0 xtask cipasses.Findings
Each of these is fixed in its own PR. This suite stays as the check.
s, s + k, s + 2k, …of the texel's pattern. A ray's elevation is the radical inverse of its index, so each subsample was confined to one elevation band. AO is linear in the rays, so it stayed right. The bent normal, though, was normalized per subsample before being averaged, and came out up to 8.3° off beside a wall at 2×2 (main: 0.04°). Bake: split each texel's rays between its antialiasing subsamples #274 now sums the unnormalized directions over the texel and normalizes once.occlusion_beside_a_wallpasses at 2×2, 4×4 and 8×8.geom::surface_at, and so the bake and the CPU path tracer, takes the signwof the triangle's first vertex.shade_meshinterpolatestan.w, which flips the bitangent partway across the triangle.Mesh::compute_tangentskeeps one tangent per vertex, so mirrored UVs meeting at a vertex produce such triangles. So do the zero-area pole triangles of a UV sphere.compute_tangents. The viewport decodes the bake up to 40.7° off.mixed_tangent_signs_decode_like_the_viewport(CPU and GPU) is#[ignore]d here until Keep MikkTSpace's tangent for each triangle corner #277 lands. On that branch it passes at 0.00°.round(255 (½ + ½x)), butsnorm8reads(byte − 128)/127. As a result, every decoded normal was off by a median 0.36° (p99 0.60°). Pack the viewport's main normal the way the shaders read it #278 packs128 + 127x, as the coat normal already did. This halves the error to rounding alone.Not covered
occlusion_falls_off_linearly_to_the_max_distancecovers Linear), the ground plane, and backface or self-occlusion filters.0.5 + h/(f + r), centred on zero height.map/normalization.rshas a branch that would map[−rear, frontal]onto 0..1 instead, but it is skipped for this mode, so it never runs. The two differ when f ≠ r. The test uses f = r, where they agree. Which one is intended needs a decision.Shade::normal_y(DirectX green flip) is never set to −1. Baked and imported normals reach the shader as OpenGL, so the export path is the only DirectX conversion. The engine test covers it.