Real-time rendering / Rendering system
Layered Material Renderer
A production-minded material system that turns curvature, thickness, and mask authoring into a readable real-time surface language.
HLSL · Shader Graph · Custom Inspector · RenderDoc · GPU instancing
What this case study is testing
The landing page must make the visual result legible in seconds, while the detail page must support a lead reviewing ownership, constraints, implementation decisions, and measurable trade-offs.
float layerWeight = saturate(curvature * _WearBreakup + thickness * _LayerBlend);
float3 blendedNormal = normalize(lerp(baseNormal, detailNormal, layerWeight));
return EvaluateMaterial(albedo, blendedNormal, roughness);Reading order
A recruiter should be able to scan the title, role, result, and visual preview without traversing the technical appendix. A rendering lead should be able to continue into the debug views and implementation notes.
Case study
Context
The art team needed layered surfaces that could be iterated by look-development artists rather than hard-coded per asset. The old approach duplicated masks and material functions across scenes, which made small visual changes expensive to validate.
Audience
Environment artists author the look; rendering engineers review the budget; production needs a stable surface that can survive asset scale-up.
Case study
Problem
The system had to expose enough control to make the material useful without turning the inspector into a list of implementation details. The original prototype could look correct on one hero asset but gave artists no way to diagnose why a layer disappeared on another asset.
Case study
Constraints
- One material variant for the common path; no per-asset shader forks.
- A predictable mobile and console fallback path.
- Debug output must explain inputs without requiring a capture session.
- The visual language must remain coherent across hard-surface and organic test assets.
Case study
Ownership
I owned the material function graph, the HLSL include that held shared evaluation logic, the debug channel design, the inspector naming pass, and the capture checklist used for review.
Case study
Solution
The solution separates authoring inputs from shading evaluation. Artists see layer intent, breakup, and preview channels; the shader receives packed parameters with a single normalization step before lighting.
struct MaterialDebug { float3 normal; float depth; float mask; float2 uv; };
MaterialDebug BuildDebug(float3 n, float d, float m, float2 uv)
{
return (MaterialDebug) { n, d, m, uv };
}Case study
Scale
The intended content range is hundreds of authored materials across multiple environment sets. The target budget was one additional texture sample for the detail layer and a bounded branch count in the forward path.
Validation sample
The test corpus includes 48 materials, three lighting conditions, two quality tiers, and a capture on both an integrated GPU and a desktop GPU.
Case study
Technical breakdown
Channel contract
Final is the review view. Normal, depth, mask, UV, roughness, and metallic are not decorative modes: each one answers a concrete question during look development or debugging.
- Normal exposes tangent-space discontinuities before lighting hides them.
- Depth shows whether the layer order is stable across geometry.
- Mask shows authoring intent independently from the final response.
- Roughness and metallic verify that the material is not compensating for a packing error.
Case study
Results / impact
The final model made the material readable to artists and reviewable by rendering. The strongest result is not a single image: it is the shorter feedback loop from ?the layer is wrong? to ?this input or stage is wrong.?
Observed impact
A representative look-dev pass moved from repeated shader edits to parameter iteration, while the debug channels made the remaining implementation issues visible in captures.
Case study
Trade-offs
The shared path is easier to maintain but less expressive than bespoke shaders. I accepted that limitation because consistency, predictable performance, and artist comprehension were more valuable than a marginally richer hero shot.