Parent: #126
Inventory: #11 material/BRDF section
Problem
The current PBR path covers core metallic/roughness rendering, but UE-class look development needs composable, energy-conserving material lobes rather than one-off shader forks. glTF extensions such as clearcoat, sheen, anisotropy, iridescence, specular, and IOR are also common interoperability requirements.
Outcome
A versioned layered-PBR material model shared by deferred/visibility, forward transparent, path-traced, and reference-render validation paths.
Minimum first release:
- base metallic/roughness dielectric/conductor;
- clearcoat with independent normal/roughness;
- sheen;
- tangent-space anisotropy;
- specular/IOR controls;
- iridescence/thin-film lobe;
- emissive energy represented consistently for exposure and GI.
Screen-space subsurface profiles may be added as a separate milestone only after the core lobe ABI is stable.
Material ABI
- Version the GPU material record; declare exact alignment/packing once for Rust and WGSL.
- Use a lobe/feature bitmask plus indices into texture/resource tables.
- Centralize BRDF functions in shared WGSL included by every relevant pipeline.
- Preserve a compact fast path for common base-only materials; do not branch every pixel through all lobes if no lobe is active.
- Translate glTF extensions without losing texture transforms, factors, color spaces, or tangent requirements.
- Invalid/missing tangent data must select a documented fallback or emit an actionable import warning.
Physical correctness rules
- Enforce energy compensation between base specular/diffuse and added lobes.
- Use consistent normal orientation, geometric normal safeguards, and roughness floors.
- Filter normal variance for minification; do not let added lobes reintroduce sparkle/aliasing.
- Match Fresnel/IOR conventions across realtime and reference/path-traced implementations.
- Explicitly define multiple-scattering approximation and reciprocity assumptions.
Implementation sequence
- Write a CPU/reference evaluation and sphere-matrix corpus for the base model.
- Introduce versioned lobe ABI without visual change.
- Land clearcoat + IOR/specular and validate energy.
- Land sheen and anisotropy with correct tangent handling.
- Land iridescence with bounded parameter ranges.
- Wire import, serialization, authoring API, debug views, and path-tracer parity.
Each lobe should be a reviewable commit/PR slice with its own tests even if one agent owns the whole issue.
Acceptance criteria
Likely files
native/shared/src/renderer/material_pipeline.rs, material_system.rs, shaders/
native/shared/shaders/material_abi.wgsl
native/shared/src/models_gltf.rs
tools/bloom-reference/src/tracer.rs
- path-tracer shaders under
native/shared/src/renderer/shaders/pt.rs
src/models/ public material types
Non-goals
- A node-based material editor.
- Strand hair, eye geometry, or a full BSSRDF in the first release.
- Maintaining two mathematically unrelated BRDF implementations.
Dependencies
Parent: #126
Inventory: #11 material/BRDF section
Problem
The current PBR path covers core metallic/roughness rendering, but UE-class look development needs composable, energy-conserving material lobes rather than one-off shader forks. glTF extensions such as clearcoat, sheen, anisotropy, iridescence, specular, and IOR are also common interoperability requirements.
Outcome
A versioned layered-PBR material model shared by deferred/visibility, forward transparent, path-traced, and reference-render validation paths.
Minimum first release:
Screen-space subsurface profiles may be added as a separate milestone only after the core lobe ABI is stable.
Material ABI
Physical correctness rules
Implementation sequence
Each lobe should be a reviewable commit/PR slice with its own tests even if one agent owns the whole issue.
Acceptance criteria
tools/bloom-referenceor Cycles at multiple view/light angles; thresholds and known model differences are recorded.Likely files
native/shared/src/renderer/material_pipeline.rs,material_system.rs,shaders/native/shared/shaders/material_abi.wgslnative/shared/src/models_gltf.rstools/bloom-reference/src/tracer.rsnative/shared/src/renderer/shaders/pt.rssrc/models/public material typesNon-goals
Dependencies