Genies iOS SDK v0.1.20
Updated: May 14, 2026
What's New
- Anti-aliasing: MSAA.
NAFView.sampleCounttoggles MSAA on the scene pass — accepts1(off),2,4(default),8. - Shader port
- Per-mesh shader overrides. Preset JSON now accepts a
multiMeshblock undertoonParams. EachmultiMesh.<meshName>entry overrides the top-level params for one mesh, keyed byNAFMeshData.name. Overrides are merged with base in a single-pass walk — every material is written once with its final merged values, no transient wrong-state. - Per-mesh runtime API on
NAFShaderManager:setActiveMesh(_:)— scope subsequent toon + outline setters to one mesh (ornilfor all meshes).meshNames: [String]— source mesh names on the active avatar.toonParams(forMesh:)/outlineParams(forMesh:)— flat canonical snapshots for UI sync.applyShaderPreset(_:)andapplyShaderPreset(json:)— single-call apply for the full preset (toon + outline + multiMesh).
- Outline pipeline. Inverted-hull pass with model-space or screen-space (
outlineConstantWidth) expansion. Per-mesh thickness / color / use-albedo / depth-bias. mgr.outlinenamespace —setEnabled,setActiveMesh,setThickness,setColor,setUseAlbedo,setConstantWidth,setDepthBias.outlineDepthBias— perspective-correct NDC nudge (position.z += bias * position.w).NAFMeshData.name— source-asset mesh node name from the nativeEntity. Used as the lookup key for per-mesh shader overrides.multiMaterialpreset added toNAFKitConfig'spresets.json.
- Per-mesh shader overrides. Preset JSON now accepts a
What's Fixed
- Preset application
- Silhouette renders flat. Toon + outline are skipped during the silhouette frame.
- Per-mesh
outlineEnabled: falsehonored. Preset entries that disable the outline on a specific mesh now skip that group entirely in the inverted-hull pass. - Toon color uniforms accept hex.
shadowColor,midColor,lightColor,highlightColornow promote.vec3(hex-decoded) to.vec4, preserving the current alpha. - Rim-light preset key remap.
LightA/B/CEquatorandLightA/B/CPolarnow map onto the iOS uniformslightA/B/CEquatorAngle/lightA/B/CPolarHeight. applyShaderPresetauto-enables toon.
What's Updated
- Behaviour changes
ToonPresetLoaderno longer pre-derivescartoonLightDirectionfrom azimuth/elevation.- Boolean preset fields (
outlineEnabled,useRoughness, …) decode to float 0/1 instead of being silently dropped.