Performance¶
A feature that is off costs nothing (static switches). Numbers: UE 5.2, Material Stats, base pass, SM5, measured with Tools/KurinMeasureAll.py.
Masters¶
| Master | Base PS | Everything on PS | Samplers (max 16) |
|---|---|---|---|
| Asset | 319 | 1350 | 7 |
| Vertex Blend | 350 | 1465 | 9 |
| Mask Blend | 355 | 1616 | 10 |
| Landscape (3 layers + cliff + macro) | 446 | 1315 | 6 |
| Foliage | 323 (VS 249) | 393 (VS 640) | 3 |
| Decal Masked | 307 | 1174 | 7 |
| Decal Translucent | 1559 | 2421 | 8 |
| Glass (translucent) | 988 | 1829 | 6 |
| Water | 1005 | 2003 | 7 |
| Interior | 397 | 1269 | 11 |
Translucent masters (Glass, Decal Translucent, Water) are expensive by nature: forward lighting is part of their base cost.
Feature cost (pixel shader instructions added)¶
| Feature | + PS | + Texture lookups |
|---|---|---|
| Weather (wet) | +20 | 0 |
| Puddles / + Depth / + Waves | +16 / +12 / +33 | 0 |
| Rain Ripples / Drops | +54 / +56 | 0 |
| Streaks | +310 | 0 |
| Puddle Patches / Frozen Puddles | +19 / +36 | +1 each |
| Shore Wetness / Submerged | +12 / +46 | 0 |
| Condensation | +46 | 0 |
| Cover | +45 | +2 |
| Dust / Emissive / Fuzzy Shading | +29 / +10 / +31 | +4 / 0 / +1 |
| Detail Normal / AO | +30 / +18 | +2 / +1 |
| Parallax / Bump Offset | +158 / +55 | 0 |
| Anti-Tiling (per layer) | +140–215 (Landscape +52) | inside the shader |
| Extra layer (Layer G / B, Landscape Layer 4) | +40–48 | +5 |
| Layer Seam / Layer Border | +50–60 / +41 | 0 |
| Water: Wind Gusts / Shore Waves / Surface Film | +444 / +243 (from depth +31) / +80 | +2 / +1 / +2 |
| Water: Foam / Duckweed / Leaves / Flow / Caustics | +71 / +93 / +95 / +56 / +32 | +1 / +3 / +3 / 0 / +3 |
| Glass: Cracks / Dirt Layers | +85 / +66 | +1 / 0 |
| Interior: Cracks / Grime / Curtains / Variation | +122 / +57 / +51 / +30 | 0 |
| Cloth Wind / Foliage Wind (vertex shader) | VS +130 / +170 (+ Interaction +145) | 0 |
Tips¶
- The big ones: Streaks, Parallax, Anti-Tiling, water Wind Gusts and Shore Waves. Use them on hero / close surfaces only.
- Streaks look expensive in Stats but skip most work on floors, far away and away from rivulets.
- Parallax writes Pixel Depth Offset (costly with Nanite); mid-distance surfaces: Use Bump Offset?.
- Wind / Cloth Wind: set World Position Offset Disable Distance on components (3000–5000 cm). Foliage LOD2+: Use Distant LOD?.
- Turn off unused layers (Use Layer G?, Use Layer B?).
- Decal Actors: keep Use Parallax? off; opacity from Base Color alpha saves the Mask Map lookup.
- Every checkbox combination is a new shader: build a small tree of parent instances.
- Distant landscape: a cheaper
_Farchild via Per LOD Override Materials (far-distance instance).
Material Quality Level¶
Low / Medium skip parallax relief, Pixel Depth Offset and self-shadow; Low also skips the detail normal and weather details (waves, ripples, drops, streaks, frost, condensation, submerged). Wetness, puddles and cover stay. Preview: viewport Settings > Material Quality Level. Shipping: add r.DiscardUnusedQuality=1 to DefaultEngine.ini.
How to measure¶
- Tools/KurinMeasureAll.py: cost of every master and every switch in one run (Output Log + Saved/KurinCost/KurinCost.md / .csv).
- Platform Stats (Material Editor): instruction count, worst case. Texture reads inside Custom nodes are not counted.
- Shader Complexity (Alt+8): relative cost on screen.
- stat gpu, ProfileGPU (Ctrl+Shift+,): real BasePass milliseconds; compare a feature on vs off in the same view.