DrummerCraig-ShaderHelperForMac icon

ShaderHelperForMac

New V2 refactor. Check README.md. Mod for Apple Silicon (ARM Mac) that automatically fixes broken/pink materials caused by mod shaders that were compiled without Metal GPU support.

CHANGELOG

v2.0.0

New: Per-mod txt configuration files

  • Each mod now gets its own .txt file in BepInEx/config/ShaderHelperForMac/ with section-based rules
  • Sections: [forcefallback], [forcetransparent], [fallback], [transparent], [original], [default]
  • [forcefallback] and [forcetransparent] handle shaders that report isSupported=true but still render pink on Metal
  • mat:MaterialName and suffix:_name rules let you target specific materials without affecting the whole mod
  • Global BepInEx config prefix entries remain supported for backwards compatibility

New: shaderhelper initmod command

  • Auto-generates a starter txt file for a mod from what the plugin has already observed in-game
  • Includes confirmed replacements, suspected problem shaders (commented out), and suffix groupings
  • Use shaderhelper initmod <DllName> force to regenerate an existing file

New: shaderhelper nearby command

  • Logs all materials on renderers within a configurable radius of the player
  • Shows shader name, support status, action, and DLL attribution
  • Supports mod filter (hides vanilla shaders) and DLL name filter
  • Scans CanvasRenderer objects (TextMeshPro/UI elements) in addition to standard renderers

New: shaderhelper reload command

  • Reloads all config files without triggering a full sweep

New: shaderhelper loaded command

  • Scans all materials in memory, including prefab assets not yet placed in the scene
  • Accepts an optional DLL name filter

Sweep improvements

  • shaderhelper sweep always reloads config files before sweeping (fixes macOS FileSystemWatcher reliability issues)
  • Sweep triggered by the console command now shows a center-screen HUD notification when complete

New Harmony patches

  • DungeonGenerator.GenerateDungeon postfix — sweeps after dungeon rooms are instantiated on zone load
  • VisEquipment.AttachItem postfix — sweeps immediately when weapons/armour/items are equipped
  • AssetBundle.LoadAsset postfix — intercepts materials the moment a bundle is loaded, eliminating first-frame pink flicker

Shader fixes

  • TextMeshPro/Distance Field (Surface) — swapped to the non-Surface variant at runtime; fixes pink text on noticeboards and signs
  • Hidden/InternalErrorShader — now correctly receives the fallback shader instead of being left unchanged

Bug fixes

  • Explicit mat: rules now correctly override the _forceReplacedMaterialIds guard (fixes cases where a material couldn't be moved between transparent and fallback)
  • initmod no longer emits suffix rules for materials using canonical Valheim shaders (e.g. draugr_eyes_elite)
  • initmod no longer emits entries in [fallback]/[transparent] for shaders covered by built-in defaults (e.g. Legacy Shaders/Particles/)
  • shaderhelper nearby uses transform.position instead of bounds.center — fixes incorrect distances for TextMeshPro sub-mesh renderers whose bounds are uninitialized

Configuration changes

  • Default All Transparent now defaults to false — mods must be explicitly configured
  • Removed Mod Enabled toggle (shader replacements are in-memory and cannot be undone without a restart)
  • Config entries renamed for clarity: Default All Transparent, Force Transparent Shader Prefixes, Force Fallback Shader Prefixes, Periodic Sweep Interval
  • Assembly version updated to 2.0.0

v1.2.0

  • Sweep interval made configurable via BepInEx config
  • Periodic sweep skips when no local player is present (main menu, loading screen)

v1.1.0

  • Added usefallbackshader.txt — replaces broken shaders with a solid visible placeholder instead of making objects invisible
  • Added shaderhelper scan and shaderhelper dumpmod console commands
  • ZNetScene.Awake postfix patch — catches Jotunn mod prefabs registered after startup sweep

v1.0.1

  • Additional logic analysis to capture pinks