Descriptions
Last updated
Last updated
A significant portion of assets for Cyberpunk 2077 leverage the complex multilayered.mt supershader. The supershader has several different component files which are used to create masks to blend procedural textures without baking them. You can read more about this technique in this documentation by CDPR Technical Art Director Krzysztof Krzyścin:
The multilayered shader is composed of three distinct parts:
Layer Masks | Mask textures that control where each surface is visible
Layer Definitions | Controls procedural effects such as tiling or color for each layer
Layer Surfaces | Links PBR textures to create numerous pre-defined visual surfaces
MLMASK files are the core element of the substance-style integration. These files contain an array of up to 20 textures which are used to control the blending between pre-defined surfaces called mltemplates. These mask textures are more-or-less 1:1 with substance-style layer masks.
As shown above, each mesh using the multilayer shader uses a unique mlmask file that is hand authored by CDPR artists. To take effect in game, each mask file is linked by the mlsetup file.
MLSETUP files are fairly self-explanatory when considering the name, multilayer setup. These files correspond with an mlmask file and are responsible for setting up parameters for each layer from the mlmask. Each layer within an mlsetup contains information very similar to materials or shaders.
Property
Description
colorScale
material
matTile
Tiling multiplier for the main surface texture
mbTile
Tiling multiplier for the microblend texture
metalLevelsIn
?
metalLevelsOut
Clamps metalness output levels
microblend
Procedural detail texture
microblendContrast
Controls influence of microblend texture
microblendNormalStrength
Multiplier for adjusting normalblend strength
microblendOffsetU
Shifts UV map for microblend texture
microblendOffsetV
Shifts UV map for microblend texture
normalStrength
Sets intensity of mltemplate normal map
offsetU
Moves UV in X direction
offsetV
Moves UV in Y direction
opacity
Sets layer opacity
overrides
?
roughLevelsIn
?
roughLevelsOut
Clamps roughness output levels
MLTEMPLATE files are the actual visible surfaces that appear on meshes using the multilayered.mt supershader. The multilayer templates include a wide variety of surfaces such as steel, iron, aluminum, plastic, nylon, linoleum, carpet, soil, grass, rubber, concreate, and everything else imaginable. Each template can use a unique color, normal, roughness, and metallic PBR texture. The mltemplate files are selected from within each layer definition of an mlsetup file. Meshes can blend up to 20 mltemplate surfaces into a single material by masking them with the mlmask.
Multilayered Shaders
engine\materials\multilayered.mt
base\materials\multilayered_clear_coat.mt | Adds clearcoat effect
base\materials\vehicle_destr_blendshape.mt | Adds procedural vehicle damage
base\materials\cloth_mov_multilayered.mt
base\materials\multilayered_terrain.mt
base\materials\ver_mov_multilayered.mt
multilayered
Texture Channels
Red
Green
Blue
Alpha
GlobalNormal
Normal R
Normal G
?
?
MaskAtlas
?
?
?
?
Name
Description
MultilayerMask
See mlmask
MultilayerSetup
See mlsetup
GlobalNormalIntensity
Sets visual intensity of normal map texture
GlobalNormalUVScale
?
GlobalNormalUVBias
?
MaskAtlas
?
MaskTiles
?
Layers
?
LayersStartIndex
?
SurfaceTexAspectRatio
Sets number of mlmask layers to be used
MaskToTileScale
?
MaskTileSize
?
MaskAtlasDims
?
MaskBaseResolution
?
SetupLayerMask
?
NormalsTextureDDXYMultiplier
?
MicroblendsTextureDDXYMultiplier
?
Sets a color from within the file
Path to file