Status: green. 6 of 100000 pixels against three.js' reference
(examples/screenshots/webgpu_loader_gltf_transmission.jpg), threshold 0.1%.
Intel Iris Xe, Mesa 25.3.6, Vulkan. Steady frame 2.9 ms, 6 draw calls, 26433
triangles. Issue #230. docs/nodes.md §94 is the long form.
IridescentDishWithOlives.glb under the same royal_esplanade_2k.hdr.jpg
PMREM as the anisotropy rung (scene.background and scene.environment,
backgroundBlurriness = 0.35), ACES at exposure 1, a 45° camera at
( 0, 0.4, 0.7 ) orbiting ( 0, 0.1, 0 ), and one animation clip. Four
materials: two transmissive glasses stacked over each other (glassDish,
glassCover), the opaque olives, and the alphaMode: MASK goldLeaf.
Measured first, before any Rust, with
npm run test-e2e-webgpu -- webgpu_loader_gltf_transmission in the pinned
checkout, twice: passes both times, Diff 0.0% (under 0.05% of pixels;
the harness prints one decimal). So the page is graded.
The page was first ported on rung-gltf-transmission (tip 2f3f53d,
branched 19 Sep from 8ec1d5b) and could not run: every primitive in the
asset is KHR_draco_mesh_compression, listed in extensionsRequired, and
nothing decoded Draco. Before a guard existed the file loaded "successfully"
into four meshes with the right counts and every value zero, because a Draco
primitive's accessors have no bufferView and a bufferView-less accessor is
a legal zero-filled one.
Carried forward onto main (branch gltf-transmission-page), file by file:
| old branch | on main | here |
|---|---|---|
GltfError::UnsupportedRequiredExtension, SUPPORTED_EXTENSIONS, check_required_extensions() (d3dccfe) |
landed as #125 (4a67156) |
dropped |
draco_required_is_an_error in tests/gltf_loader.rs |
contradicts main, whose SUPPORTED_EXTENSIONS has KHR_draco_mesh_compression |
dropped |
| the Draco blocker | the pure-Rust decoder (src/loaders/draco, #139 / #150) |
the asset decodes with real positions |
alphaMode: MASK left unwired |
out.alpha_test = alpha_cutoff, emitted as the materialAlphaTest uniform |
gated against three's dump (below) |
examples/webgpu_loader_gltf_transmission.rs |
— | re-applied, brought up to the sheen/anisotropy page shape |
docs/nodes.md §28, this doc |
— | renumbered to §94, rewritten |
OrbitControlsinstead of alookAt. The old branch replaced the controls withcamera.look_at(), reasoning that the graded auto-rotation delta is 0. It is not: the page callscontrols.update()without a delta, and_getAutoRotationAngle( null )is the frame-count branch,2π / 60 / 60 * autoRotateSpeedper call, which the pinned clock does not stop. The page calls it once ininit()and once per frame, throughenableDamping'sdampingFactor, so the graded camera is turned by two damped steps of-0.75speed. The port now builds the controls with the page's settings and callsupdate( None )in the same two places.- A
Timer.mixer.update( timer.getDelta() )as the page does it; the first delta is 0 under the pinned clock, so the graded pose is the clip's first keyframe, as inwebgpu_skinning. resize(),controls(),controls_and_camera()andpin_timeinmain(), the shape every graded page has for the viewer and the browser shell.
- The rung:
webgpu_loader_gltf_transmissionintests/e2e/main.rs, and on thesteady_frame_builds_nothinglist (frames two and three build, compile and upload nothing; the mixer at delta 0 and the auto-rotating camera write uniforms only). alphaMode: MASK:gltf_transmission_gold_leaf_alpha_test_matches_threeintests/nodes_display_wgsl.rs, against three'sgoldLeaffragment module from this page's dump (tests/fixtures/nodes_display/webgpu_loader_gltf_transmission_m12_gold_leaf.wgsl): the base-colour map times theVEC4COLOR_0, the opacity, the discard againstobject.nodeUniformN(the uniform, not a literal) and the opaqueDiffuseColor.w = 1.0.
No new material or TSL code was needed: the transmission path, the
KHR_materials_* extensions this asset uses, vertex colours, the Draco
decoder and the MASK uniform were all already on main. What this page adds is
the first graded frame of each of them on a glTF.
| what | pixels of 100000 |
|---|---|
| three.js against its reference, run 1 | 0.0% (pass) |
| three.js against its reference, run 2 | 0.0% (pass) |
| the port, first run on current main | 6 |
The steady-frame time is the e2e grader's (frames 2..4: 3.38, 2.91, 2.90
ms). viewer --headless --frames 40 measured 6 to 12 ms for this page and
13 ms for the anisotropy page (README: 3.2 ms) during the same session,
with sibling agents building on the machine, so the grader's quieter number
is the one in the README table.
Nothing for the rung. What it does not test, and stays open elsewhere:
KHR_materials_iridescence: despite the asset's name it is not in the file (#229 is the iridescence rung).- Double-pass transmission: neither glass is
doubleSided. attenuationDistance: the volume extension here leaves it at infinity.