Skip to main content

Genies iOS SDK v0.1.23

Updated: May 22, 2026

What's New

  • Toon preset wiring
    • Shared C++ ToonPresetDecoder replaces the Swift JSON decoder. Fixes per-mesh alpha-only overrides (e.g. LightAAlpha without LightAColor now combines with the base scope's RGB instead of silently dropping). Inverts LightA/B/CSoftness at decode time so authors set the intuitive value.
    • 9 new toon JSON keys wired in ToonUniforms + shader: shadowIntensity, shadowSoftness, shadowAlbedoDarken, shadowCartoonInfluence, shadowNormalLightsInfluence, alphaCutoff, alphaOpacity, enabled, outlineThicknessMultiplier. All no-op at default values.
    • twoSided — per-mesh cull mode override at encode time. MTLCullMode.none when set.
    • alphaEnabled — per-mesh routes to the blended pipeline variant (sourceAlpha + oneMinusSourceAlpha). Cross-group order is iteration order — no back-to-front depth sort.
  • Colour grading LUT
    • NAFView.setColorGradingLUT(_:strength:) — 3D LUT applied in toon fragments after tone-map. Overloads accept raw MTLTexture, strip-layout UIImage, or Adobe .cube file URL.
    • NAFView.colorGradingLUTStrength: Float — toggle the effect 0/1 without re-loading.
    • ColorGradingLUTLoader in NAFKitUI: .makeCubeFileTexture(url:device:) parses Adobe .cube; .makeStripLayoutTexture(image:device:) accepts side² × side strip PNGs.
  • Depth-Sobel outline pass
    • NAFView.postOutline: PostOutlineSettings — depth-based Sobel edge detection + 32-sample disk dilation. Auto-driven from preset ppOutline* keys via apply(preset:). Knobs: enabled, depthEnabled, depthThreshold, thickness, color, cameraNear/Far. Allocates extra shader-readable depth resolve + (HDR-off) intermediate scene-colour target only when enabled.
  • Power / thermal knobs on NAFView
    • renderScale: CGFloat (default 1.0, clamped 0.25…1.0). Multiplies the MTKView's content scale — 0.5 quarters fragment cost.
    • rendersOnDemand: Bool (default false). Display link paused; draws only when state changes.
    • preferredFramesPerSecond: Int (default 60). Hard FPS cap; also caps adaptiveFrameRate's active tier.
    • adaptiveFrameRate: Bool (default false) plus adaptiveActiveFPS: Int (default 60) and adaptiveIdleFPS: Int (default 24). Auto-modulates FPS based on isAnimationActive. preferredFramesPerSecond caps the active tier.
    • NAFAvatarSession.isAnimationActive: Bool — OR-aggregate of every motion weight > 0.01. Drives the adaptive governor; readable if you want your own throttling.

What's Updated

  • Behaviour changes
    • ToneMappingSettings.mode default flipped from .acesFilmic to .linear — matches the cartoon pipeline. ACES is opt-in.