Skip to content

Commit 4f6df63

Browse files
committed
Add textured specular path transport
1 parent 45719bf commit 4f6df63

8 files changed

Lines changed: 814 additions & 147 deletions

File tree

docs/layered-pbr.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,19 @@ A scene without a qualified record dispatches the original base pipeline
208208
exactly. Clearcoat/specular-only scenes bind one sidecar buffer; scalar
209209
anisotropy and iridescence select separately constant-folded code variants
210210
without adding a resource, and only a scene with scalar sheen creates the
211-
32 KiB directional-albedo LUT. The sidecar marks texture-bearing lobes
212-
separately and leaves each one on established base PT semantics rather than
213-
applying an incorrect scalar approximation. Textured factors and clearcoat
214-
normals remain separate follow-up slices.
211+
32 KiB directional-albedo LUT.
212+
213+
Resolved UV0 `KHR_materials_specular` factor and color textures are the first
214+
qualified texture-bearing PT slice. They use the renderer's existing texture
215+
array, reconstruct the committed triangle UV at both primary and bounce hits,
216+
apply the exact authored offset/rotation/scale transform, read factor from
217+
alpha, and convert specular color from sRGB before modifying the same
218+
dielectric F0/F90 transport as the scalar path. Their transforms live in a
219+
separate, independently lazy 64-byte-per-instance sidecar, so the established
220+
96-byte scalar ABI and every scalar-only bind group remain unchanged.
221+
Unresolved textures, UV1 textures, other textured lobes, and clearcoat normal
222+
textures remain explicitly unqualified instead of receiving an incorrect
223+
scalar approximation.
215224

216225
## Runtime material-record ABI
217226

@@ -283,16 +292,25 @@ instance lazily backfills a parallel 96-byte-per-instance scalar record.
283292
Only a frame that both enables PT and contains one of those records compiles
284293
the group-2 pipeline and allocates/binds its storage buffer. Base-only scenes
285294
retain the established shader source, pipeline, bindings, instance record, and
286-
GPU cost.
295+
GPU cost. Qualified UV0 specular textures independently backfill a 64-byte
296+
texture-transform record and select a texture-only pipeline/resource bit; no
297+
texture record, binding, UV interpolation, or texture fetch exists in the base
298+
pipeline or scalar-only resource layouts.
287299

288300
Metal ray-query qualification renders the same seeded scene through base,
289301
clearcoat, specular/IOR, sheen, anisotropy, iridescence, and combined scalar
290302
pipelines. It requires byte-identical output for an unqualified textured lobe,
291303
visible bounded-energy responses for every qualified lobe, a distinct highlight
292304
after a 90-degree anisotropy rotation on explicit vertex tangents, and a
293305
spectral image change between 180 nm and 520 nm films. Telemetry verifies that
294-
sheen, anisotropy, and iridescence code variants remain independently lazy.
295-
Texture authoring and texture-sampled PT parity are the next reviewed slices.
306+
sheen, anisotropy, iridescence, and texture code variants remain independently
307+
lazy. The texture corpus additionally requires white UV0 specular textures to
308+
be byte-identical to scalar specular transport, an alpha-varying factor texture
309+
to produce a visible bounded response, and a 90-degree texture transform to
310+
turn that response. A resolved but unqualified UV1 texture must remain
311+
byte-identical to the established base path and allocate no texture sidecar.
312+
UV1 PT geometry retention, the remaining factor textures, and clearcoat normal
313+
transport are the next reviewed slices.
296314

297315
## Public authoring API
298316

docs/pt/pt-roadmap.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,12 @@ multi-bounce colour bleed.
8181
including their combined composition. Sheen, anisotropy, and iridescence
8282
select independently lazy, constant-folded code variants; only sheen adds
8383
the 32 KiB LUT. The base kernel, shared GI record, bindings, and cost remain
84-
unchanged; unqualified or texture-bearing lobes continue to dispatch the
85-
exact base pipeline until complete transport is qualified.
84+
unchanged. Resolved UV0 specular-factor/color textures use the existing
85+
texture array plus a separately lazy 64-byte transform record, with
86+
transformed UV reconstruction at primary and bounce hits. White textures
87+
are byte-identical to the scalar path. Unresolved, UV1, and other
88+
texture-bearing lobes continue to use exact established PT semantics until
89+
their complete transport is qualified.
8690
- Emissive from material data (VFX/muzzle flashes become real light in PT).
8791

8892
### Tier 3 — PT-3/PT-4: gameplay

0 commit comments

Comments
 (0)