Skip to main content

Genies iOS SDK v0.1.20

Updated: May 14, 2026

What's New

  • Anti-aliasing: MSAA. NAFView.sampleCount toggles MSAA on the scene pass — accepts 1 (off), 2, 4 (default), 8.
  • Shader port
    • Per-mesh shader overrides. Preset JSON now accepts a multiMesh block under toonParams. Each multiMesh.<meshName> entry overrides the top-level params for one mesh, keyed by NAFMeshData.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 (or nil for all meshes).
      • meshNames: [String] — source mesh names on the active avatar.
      • toonParams(forMesh:) / outlineParams(forMesh:) — flat canonical snapshots for UI sync.
      • applyShaderPreset(_:) and applyShaderPreset(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.outline namespacesetEnabled, 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 native Entity. Used as the lookup key for per-mesh shader overrides.
    • multiMaterial preset added to NAFKitConfig's presets.json.

What's Fixed

  • Preset application
    • Silhouette renders flat. Toon + outline are skipped during the silhouette frame.
    • Per-mesh outlineEnabled: false honored. 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, highlightColor now promote .vec3 (hex-decoded) to .vec4, preserving the current alpha.
    • Rim-light preset key remap. LightA/B/CEquator and LightA/B/CPolar now map onto the iOS uniforms lightA/B/CEquatorAngle / lightA/B/CPolarHeight.
    • applyShaderPreset auto-enables toon.

What's Updated

  • Behaviour changes
    • ToonPresetLoader no longer pre-derives cartoonLightDirection from azimuth/elevation.
    • Boolean preset fields (outlineEnabled, useRoughness, …) decode to float 0/1 instead of being silently dropped.