Documentation / Shader Optimization Suite
Unreal Engine · Documentation

Shader Optimization Suite

Editor-only tools for finding expensive material nodes, sampler pressure, Nanite/Lumen risks and shader-permutation growth before they become production problems.

MCV HotspotsTexture AnalysisNanite & Lumen AuditPermutation Scanner
Documentation

Overview

SHADER OPTIMIZATION SUITE

User Guide & Technical Reference

A practical guide to finding expensive materials, sampler pressure, Nanite/Lumen risks, and shader permutation growth before they become production problems.

Documentation

Contents

  1. Overview and quick start
  2. Editor integration
  3. MCV Hotspots and overlay
  4. Texture Analysis
  5. Nanite & Lumen Audit
  6. Shader Permutation Bloat Scanner
  7. Broom cleanup tool
  8. Shader compilation controls
  9. Settings reference
  10. Troubleshooting and interpretation11. Technical notes and release checklist
  11. Troubleshooting and interpretation
  12. Technical notes and release checklist
Documentation

1. Overview and quick start

Shader Optimization Suite is an editor-only Unreal Engine plugin for turning material and shader complexity into actionable information. It is designed for artists and technical artists first, while keeping enough detail for rendering engineers to validate the numbers.

ToolUse it when you need to…
MCV HotspotsFind expensive nodes and understand what drives their cost.
Texture AnalysisCheck sampler pressure, texture usage, and packing opportunities.
Nanite & Lumen AuditReview material compatibility and likely rendering risks.
Permutation Bloat ScannerEstimate how static switches and usage flags multiply shader variants.
BroomDim or remove dead material nodes while keeping the graph readable.

Quick start

  • Enable the ShaderOptimizationTool plugin and restart the editor if prompted.
  • Open a material in the Material Editor. The MCV button is available in the material toolbar.
  • Use Open Analysis Window to inspect all three analysis tabs. Refresh Analysis repeats every calculation for the current selection.
  • For project-level shader controls, use the Shader Optimization section in the Level Editor toolbar.
1. Overview and quick start interface
Documentation

2. Editor integration

The plugin loads as an Editor module after engine startup. It adds commands to the Level Editor, Material Editor, and Content Browser without changing cooked runtime behavior.

LocationVisualCommands
Level Editor toolbarSkip Shader Compilation · Lambert View · Flush Shader Queue · Recompile All Shaders · Shader Permutation Bloat Scanner
Material Editor toolbarMCV · Broom
MCV dropdownEnable MCV Overlay · Open Analysis Window · Refresh Analysis · Texture Sampler Analysis · Nanite & Lumen Audit
Content BrowserNanite & Lumen Audit · Scan Permutation Bloat…

The analysis window is reusable. Each command updates its context, selects the requested tab, and brings the window to the front. A single material uses the title “Material Optimization Analysis — <MaterialName>”; multiple materials use “Material Optimization Analysis — N Materials”.

Documentation

3. MCV Hotspots and overlay

MCV (Material Complexity Visualization) ranks material expressions using a weighted estimate of ALU work, texture samples, dependent reads, flow control, and feature penalties. The goal is not a GPU profiler replacement; it is a fast way to see which nodes deserve attention.

What the overlay shows

  • Every analyzed node receives a temporary label in the form [MCV-L cost], [MCV-M cost], [MCV-H cost], or [MCV-X cost].
  • Labels are written to the material graph node comment and its bubble visibility, which is the representation Unreal Engine 5.7 actually displays.
  • Connections are colored with the MCV gradient and their thickness follows normalized cost. Show Wires is respected.
  • Turning the overlay off restores each node’s exact original comment and visibility. Closing the Material Editor or unloading the plugin also restores the saved state.
  • Refresh Analysis replaces prior MCV labels instead of leaving stale prefixes behind. Opening a material with MCV already enabled reapplies the visual layer automatically.

Cost model

ComponentWhat it represents
ALUArithmetic and logical operations.
SamplesTexture and other sampling work.
Dependent ReadsReads whose coordinates depend on earlier results.
FlowBranches, loops, and other control-flow pressure.
Feature PenaltyExtra weight for features known to be costly or risky.

The total is a weighted score. Budgets are editable in project settings, so the same score can be tuned to match the team’s material style and target hardware.

Normalization modes

ModeMeaning
P95Uses the 95th percentile as the reference. A few outliers do not flatten the contrast for the rest of the graph.
Global MaxCompares nodes with the most expensive node in the current material.
AbsoluteCompares against BudgetTotal, making colors comparable across materials.

Changing the mode recalculates the ranking, labels, and wire colors immediately. Click a row in MCV Hotspots to select and focus the corresponding node in the Material Editor.

3. MCV Hotspots and overlay interface
Documentation

4. Texture Analysis

Texture Analysis reports sampler pressure and highlights patterns that are easy to miss. The warning threshold is 12 samplers; when compiled statistics are unavailable, results are marked Estimated and use a conservative fallback limit of 16 without forcing shader compilation.

  • Each row includes texture, parameter name, compression, sRGB state, and inferred use.
  • The analyzer flags separate AO, Roughness, and Metallic textures, repeated samplers, and channels that could be packed together.
  • Recommendations are deliberately practical: pack compatible channels, reuse parameters, and avoid duplicate samples where the material can share one read.
  • Results stay in the analysis window; no floating notification is used for the final report.
4. Texture Analysis interface
Documentation

5. Nanite & Lumen Audit

The audit checks selected materials against common Nanite and Lumen constraints and explains what to change. Results are grouped by material and always include clean materials, so an empty issue list is an explicit result rather than missing data.

SeverityTypical interpretation
InfoA note or compatibility detail worth keeping in mind.
WarningA configuration that may reduce quality or cost more than expected.
ErrorA likely incompatibility or a setting that needs a deliberate fix.
5. Nanite & Lumen Audit interface

Each finding includes a category, description, and recommended solution. The same “Nanite & Lumen Audit” label is used in the dropdown, tab, Content Browser, and documentation. A multi-selection from the Content Browser opens the same reusable window and recalculates all selected materials.

Documentation

6. Shader Permutation Bloat Scanner

The scanner is a fast planning tool for static-switch growth. It analyzes UMaterial assets, not Material Instances, and produces a heuristic estimate rather than the exact number of shaders the engine will compile.

Estimate used by the scanner

TermFormula / definition
BasePermutations2^min(StaticSwitchCount, 40)
UsageMultiplier2^number of active usage flags
EstimatedTotalBasePermutations × UsageMultiplier

Both StaticSwitchParameter and StaticSwitch expressions are counted. The 40-switch cap prevents the estimate from overflowing into an unhelpful number while still making the growth curve visible.

Usage flags included

The multiplier can include Static Lighting, Skeletal Mesh, Particle Sprites, Beam Trails, Mesh Particles, Niagara Sprites, Niagara Ribbons, Niagara Mesh Particles, Instanced Static Meshes, Geometry Collections, Water, Hair Strands, Lidar Point Cloud, and Virtual Heightfield Mesh. The scanner shows the active flags in its tooltip so the multiplier can be checked by hand.

How to validate M_Test_Permutations

6. Shader Permutation Bloat Scanner interface
  • Three switches must report Base Perms = 8.
  • Confirm the displayed multiplier equals 2^n for the flags shown in the tooltip.
  • Confirm Total Permutations = 8 × UsageMultiplier.
  • Try ascending and descending sorting; the order should reverse without changing values.
  • Double-click the row and verify that the Content Browser selection follows it.
  • Export CSV and confirm the headers are correct and values are written in full, without abbreviated suffixes.

The Grand Total is the sum of the estimates in the report. It is not memory usage and it is not a direct compile-time prediction. Platform, shader model, quality level, feature level, rendering passes, vertex factories, shading models, and instance-specific behavior are outside this heuristic.

Documentation

7. Broom cleanup tool

Broom is a graph cleanup aid for dead or unused nodes. It dims candidates first so the artist can review the result. Delete reanalyzes the graph, asks for confirmation with the current node count, and removes only the revalidated set through the standard Material Editor workflow, so the action can be undone. Dim adds a [DEAD] prefix to the graph node comment; Restore removes only that prefix and preserves the rest of the user's comment. Use Broom as a presentation and maintenance tool; it is not a substitute for understanding why a node became disconnected.

Documentation

8. Shader compilation controls

CommandPurpose
Skip Shader CompilationTemporarily pauses material shader compilation. Uncompiled materials use the fallback World Grid Material.
Lambert ViewSwitches the viewport to a simple lighting view for material inspection.
Cancel Material Shader CompilationCancels outstanding material shader compilation jobs for currently loaded materials. Global shader jobs are not affected.
Recompile All ShadersCollects materials used by the current level and queues a full recompilation for those materials; it does not recompile every project or global shader.
Shader Permutation Bloat ScannerEstimates shader permutation growth from static switches and active usage flags.
Documentation

9. Settings reference

SettingDefault / valuesNotes
Enable MCV OverlayOffStores the editor preference for the visual layer.
MCV Normalization ModeP95P95, Global Max, or Absolute.
MCV Show WiresOnWhen off, no wire colors are registered.
Total Cost Budget300Reference for Absolute normalization.
ALU Budget250Weighted arithmetic budget.
Texture Sample Budget64Sampling reference.
Control Flow Budget80Branch/loop reference.
Dependent Reads Budget64Dependent-read reference.
Feature Penalty Budget100Feature-specific weight.
Emissive Boost Warning Threshold10Nanite/Lumen audit threshold.

Settings are editor-facing and can be tuned per project. Changing budgets affects presentation and prioritization; it does not alter the material or the renderer.

Documentation

10. Troubleshooting and interpretation

SymptomWhat to check
No MCV labelsConfirm that the material is open and MCV is enabled. Disable and re-enable MCV, then use Refresh Analysis. If the graph was edited, reopen the Material Editor.
Wires stay grayShow Wires may be disabled, or the graph has not been refreshed after changing normalization.
Texture count looks highCheck repeated samples and whether AO/Roughness/Metallic can be packed.
Audit is emptyAn explicit clean-material row is expected; verify the selected asset is a material, not an instance.
Permutation number seems hugeThat is the intended exponential warning. Review static switches and active usage flags before treating it as a compile-time fact.
Comments changed after a crashReopen the Material Editor and verify the graph before saving. The overlay restores comments before save and does not intentionally serialize presentation changes; after an unexpected editor close, this check is a sensible precaution.

Treat every number as a prioritization signal. GPU captures, shader compiler output, platform profiles, and real content remain the final authority for performance decisions.

Documentation

11. Technical notes and release checklist

The plugin is an Editor module loaded at PostEngineInit. Its UI is built with Slate and editor menu extensions. MCV graph annotations are presentation state: the implementation saves and restores NodeComment and bCommentBubbleVisible, avoids material Modify calls and recompilation, and restores the graph before save. The analysis window owns the presentation for hotspots, textures, and audits, which keeps results in one place and avoids transient notifications.