Shader Stripping
Pixel-Perfect Fog Of War compiles its full-screen fog into many shader variants — one combination per appearance look and feature keyword. The Shader Stripper lets you remove the variants you don't use from your builds, reducing build size and shader compile time.
The Shader Config Asset
Stripping is controlled by a FOW_ShaderConfig ScriptableObject. It is created automatically at Assets/FogOfWar/FOW_ShaderConfig.asset — select it in the Project window to edit its options.
Note
The shader config is editor-only — it lives in the editor assembly and never ships in your build, so it doesn't need to be a preloaded asset. Only one config is active at a time (toggle Is Active Asset); the active one is what the stripper reads at build time.
What You Can Strip
Enable a toggle to strip variants matching that feature or look from builds.
Appearance Looks — strip any appearance you never use:
- Solid Color, Grayscale, Blur, Texture Sample, Outline, Custom
Feature Variants:
- No Spatial Hashing, Pixelate, Dithering, Arc Leaking (Bleeding), Texture Blur, Realtime Sampling, 2D, Hard Fog, Soft Fog, Regrow
It also holds the Custom Effect Hlsl reference used by the Custom Fog Shader.
Example
If your game only ever uses Soft fog with the Solid Color look, you can strip the Hard Fog variant and every other appearance (Grayscale, Blur, Texture, Outline, Custom) to trim the build.
Warning
Only strip variants you are certain you will never use at runtime. If you switch fog appearance or toggle features at runtime (for example via SetFowAppearance), do not strip those variants — a stripped variant will fail to render in the player build.