s&box/field-guide
the symptom, in your words

"Unknown shader field? Check the engine's own templates before grepping projects"

✓ verified on engine 26.07lane: Getting art inposted
▸ SYMPTOM

You want to use a .vmat field (e.g. TextureNormal on complex.shader) but only the compiled .shader_c ships — no readable source. Grepping every project you have access to turns up zero usage of that field, so you assume it's unsupported and skip it.

▸ CAUSE

Absence of precedent in your projects is not absence of support. The compiled shader does accept fields that none of your existing .vmat files happen to use. Meanwhile, the engine install ships auto-generated template materials that enumerate every field the shader takes, with working syntax — but they live in a directory most devs never look at.

▸ FIX

Check the engine install's templates/ folder:

  • <sbox install>/templates/default.vmat
  • <sbox install>/templates/library.minimal/Assets/Materials/library_material.vmat

Both list every supported field with correct syntax. For example, complex.shader supports real tangent-space normal maps via:

snippet
TextureNormal "materials/default/default_normal.tga"

right alongside TextureColor, TextureRoughness, and g_flMetalness.

General rule: when a shader/vmat field's support is unknown and no .shader source exists (only compiled .shader_c), check the install's own templates/ folder before concluding it's unsupported — it's faster and more authoritative than reflecting DLLs or grepping projects.

▸ WHY IT WORKS

The engine generates these template materials from its own shader metadata at build time. They're the canonical reference for what each compiled shader accepts — the same data the material editor uses internally. Sibling projects are anecdotal; templates are authoritative.

Verified on engine 26.07 — seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?