After loading a level, open Edit → Materials to launch the Material Editor. It edits the level's visual/render materials — texture samplers, ubershader features, and shader parameters stored under that level's RENDERABLE data (e.g. LEVEL_MODELS.MTL / LEVEL_MODELS.CST).
This is separate from Physical Materials (collision / Havok surface types under Configurations). The Material Editor is about how things look.
The same window can also open as a picker (with Use This Material) from places like renderable instances, the Material Mapping Editor, Model Editor import, and entity parameters that take a material — those used to be a plain text field.
The left list shows materials for the loaded level, grouped by ubershader type. Use Search / Clear to filter, then select a material to edit it on the right. Edits apply in memory immediately (Viewport and other views that use the material can update without waiting for a disk save).
The footer shows the material's Ubershader Type (read-only).
Each material can reference textures through sampler slots (up to 12). Tabs list the sampler names for that ubershader — a bold tab usually means a texture is assigned.
A preview and reference details (sampler index, texture name/format, and so on) appear below when a texture is set.
Feature checkboxes toggle ubershader feature flags — dirt maps, detail normals, parallax, alpha blending, and so on, depending on the ubershader type.
A feature isn't just a switch inside one shader. Every combination of features is a separate compiled shader, and toggling one binds the material to a different one. That's why the checkboxes used to do nothing useful: the permutation you were asking for generally wasn't in the level.
They now work. Each checkbox tells you where the permutation it needs would come from:
Features whose permutation can't be reached by any of those three routes stay hidden, so a checkbox you can see is one you can actually use. Switching a feature migrates the material's existing shader constants onto the new shader rather than resetting them.
The first time you launch OpenCAGE against a game install, it harvests a shader permutation database from your game data in the background — every (family, feature mask) combination the game actually ships, gathered from every level. You'll see progress in the status bar; nothing blocks while it runs, and if it fails you're simply left with the permutations each level already carries.
Beneath the feature list, the editor tells you how many combinations are currently reachable for the material's family, and Permutation mask: 0x… shows the material's current feature mask. Where more than one combination is available, you can pick from the full list directly rather than toggling features one at a time.
For some ubershader families — fog planes and spheres among them — permutations can be generated on demand rather than only found, this is due to the simplicity of their shaders. Support for this may expand over time.
Parameters expose pixel-shader constants for the material (floats, vectors, colours). Colour-like parameters (names containing colour/tint, etc.) get a colour preview and Pick Color….
Only parameters that the shader maps into the material's constant buffer are listed.
There are two ways to get a new material.
Only families that can actually be built on are offered when creating a material — if none are available for the level, the editor says so rather than producing something the game can't render.
The Material Editor has no separate Save button. Persist changes with File → Save Level (Ctrl+S). That writes the level's material (and related) files back to disk.
Saving closes the game if it's running so install files aren't locked.
MATERIALS.BML), not visual MTL materials