Shader Profiles Overview
Overview of shader profiles defined in the extractor (StaticMaterial.cs). These profiles map shader paths (and their FNV1a hashes) to parameter conventions used for material extraction and GLTF export.
Each profile sets which parameters to read for textures, tint, flipbooks, scrolling, and bloom. Frontend code relies on these resolved values; no frontend-side guessing of shader params is needed.
VFX Material Parameters
VFX emitter meshes (e.g., noodle effects) can have UV scroll and scale parameters defined in VfxEmitterDefinitionData rather than StaticMaterialDef. The extractor now supports:
- birthUvScrollRate →
uvScrollSpeedin material extras - uvScale →
uvTilein material extras
These parameters override StaticMaterial values when present, allowing particle-attached meshes to have animated textures independent of their base material shader.
Profiles (one page per shader)
- Shaders/SkinnedMesh/TFT_UV_Shift
- Shaders/SkinnedMesh/TFT_FixedUVSpace_Bloom
- Shaders/SkinnedMesh/PanBloom
- Shaders/SkinnedMesh/Flipbook_Frame_Select
- Shaders/SkinnedMesh/Flipbook_Outline_blend
- Shaders/SkinnedMesh/AlphaBlend_Additive_Scroll_Packed
- Shaders/SkinnedMesh/Glass
- Shaders/SkinnedMesh/Diffuse_Tint
- Shaders/SkinnedMesh/Diffuse_Rotate - UV rotation animation
- VFX Material Parameters - UV scroll/tile from particle emitters
Hash-Based Resolution
- Each profile also maps to its FNV1a32 hash for cases where shader path is stored as an ObjectLink hash.
- Matching order: exact path → hash → substring fallback (extracts name from path).
Frontend Expectations
- Scroll parameters feed
handleUvScroll/handleUvTile(from eitherStaticMaterialorVfxEmitterDefinitionData). - Rotation parameters feed
handleUvRotationfor animated texture rotation around a center point. - Flipbook parameters feed either
flipbookKeyframes(accessory hash) orflipbookEvents(TFT) depending on shader and material flags. - Bloom flag controls material pipeline decisions for effects.
- UV scroll and rotation respect animation time scale and pause state for synchronized playback.
- AlphaIntensity (from
AlphaIntensityParam) controls material opacity separate from color tint alpha.
Default Profile
- If no specific profile matches, the default uses
FlipbookSizeand standard texture/tint fallbacks; avoid relying on it for custom shaders.