Materials are composed of shader blocks, each block has multiple subroutine variants.
Shader blocks:
- albedo
- diffusion
- displacement
- emissive
- microsurface
- occlusion
- reflection
- reflectivity
- secondaryReflection
- subdivision
- surface
- transparency
- extra
Example:
mymat = mset.findMaterial("My Existing Material")
if isinstance(mymat, mset.Material):
# Set a specific variant for a block:
mymat.setSubroutine("albedo", "Vertex Color")
# Disable a shader block:
mymat.setSubroutine("microsurface", "")
See also:
Albedo
subroutine fields:
Albedo Map
: mset.TextureColor
: List (float, float, float)
Vertex Color
subroutine fields:
Albedo Map
: mset.TextureColor
: List (float, float, float)Vertex Color
: boolsRGB Color
: boolVertex Alpha
: bool
Dota Color
subroutine fields:
Color Map
: mset.TextureDetail Mask
: mset.TextureChannel;detailMask
: int (0
: R,1
: G,2
: B,3
: A)Diffuse/Fresnel Mask
: mset.TextureChannel;diffFresnelMask
: int (0
: R,1
: G,2
: B,3
: A)Metalness Mask
: mset.TextureChannel;metalnessMask
: int (0
: R,1
: G,2
: B,3
: A)Self-Illumination Mask
: mset.TextureChannel;selfIllumMask
: int (0
: R,1
: G,2
: B,3
: A)Self Illumination
: float (0.0
to8.0
)Detail Map
: mset.TextureDetail Strength
: float (0.0
to8.0
)Detail Tile
: float (0.0
to128.0
)Fresnel Warp
: mset.TextureFresnel Color Warp
: mset.Texture
Unlit
subroutine fields:
Lambertian
subroutine fields:
Microfiber
subroutine fields:
Fuzz Map
: mset.TextureFuzz
: float (0.0
to1.0
)Fuzz Color
: List (float, float, float)Fuzz Scatter
: float (0.0
to1.0
)Fuzz Occlusion
: float (0.0
to1.0
)Mask Fuzz with Gloss
: bool
Subsurface Scatter
subroutine fields:
Scatter Map
: mset.TextureScatter Depth (mm)
: float (0.0
to1000.0
)Scatter Color
: List (float, float, float)Translucency Map
: mset.TextureTranslucency
: float (0.0
to1.0
)Translucency Color
: List (float, float, float)Translucency Depth (mm)
: float (0.0
to1000.0
)Translucency Scatter
: float (0.0
to1.0
)Fuzz Map
: mset.TextureFuzz
: float (0.0
to1.0
)Fuzz Color
: List (float, float, float)Mask Fuzz with Gloss
: bool
Dota Diffuse
subroutine fields:
Diffuse Warp
: mset.Texture
Height
subroutine fields:
Displacement Map
: mset.TextureScale
: float (0.0
to1.0
)Scale Center
: float (0.0
to1.0
)Relative Scale
: bool
Vector
subroutine fields:
Displacement Map
: mset.TextureTangent Space
: boolFlip X
: boolFlip Y
: boolFlip Z
: boolScale
: float (0.0
to4.0
)Scale Center
: float (0.0
to1.0
)Relative Scale
: bool
Emissive
subroutine fields:
Emissive Map
: mset.TextureColor
: List (float, float, float)Intensity
: float (0.0
to10.0
)UV Set
: int (0
or1.0
)Glow
: List (float, float, float)
Heat
subroutine fields:
Heat Map
: mset.TextureIntensity
: float (0.0
to10.0
)Temperature (K)
: float (0.0
to10000.0
)Minimum Temperature (K)
: float (0.0
to10000.0
)
Fluorescent
subroutine fields:
Fluorescence Map
: mset.TextureColor
: List (float, float, float)Strength
: float (0.0
to50.0
)
Gloss
subroutine fields:
Gloss Map
: mset.TextureChannel
: int (0
: R,1
: G,2
: B,3
: A)Gloss
: float (0.0
to1.0
)Invert
: bool
Roughness
subroutine fields:
Roughness Map
: mset.TextureChannel
: int (0
: R,1
: G,2
: B,3
: A)Roughness
: float (0.0
to1.0
)Invert;roughness
: bool
Advanced Micro
subroutine fields:
Microsurface Map
: mset.TextureChannel
: int (0
: R,1
: G,2
: B,3
: A)Mode
: int (0
: Smoothness,1
: Roughness)Maximum
: float (0.0
to1.0
)Minimum
: float (0.0
to1.0
)Exponent
: float (0.1
to8.0
)Horizon Smoothing
: float (0.0
to1.0
)
Occlusion
subroutine fields:
Occlusion Map
: mset.TextureChannel;occlusion
: int (0
: R,1
: G,2
: B,3
: A)Occlusion
: float (0.0
to1.0
)UV Set
: int (0
or1
)Vertex Channel
: int (0
: -,1
: R,2
: G,3
: B,4
: A)Cavity Map
: mset.TextureChannel;cavity
: int (0
: R,1
: G,2
: B,3
: A)Diffuse Cavity
: float (0.0
to1.0
)Specular Cavity
: float (0.0
to1.0
)
Mirror
subroutine fields:
Horizon Occlusion
: float (0.0
to4.0
)
Blinn-Phong
subroutine fields:
Horizon Occlusion
: float (0.0
to4.0
)
GGX
subroutine fields:
Horizon Occlusion
: float (0.0
to4.0
)
Anisotropic
subroutine fields:
Horizon Occlusion
: float (0.0
to4.0
)Direction Map
: mset.TextureScale & Bias
: boolSwap X/Y Direction
: boolAnisotropy
: float (0.0
to1.0
)Anisotropy Direction
: float (0.0
to360.0
)
Specular
subroutine fields:
Specular Map
: mset.TextureChannel;specular
: int (0
: R,1
: G,2
: B,3
: A,4
: RGB)Intensity
: float (0.0
to1.0
)Color
: List (float, float, float)Fresnel
: float (0.0
to1.0
)Fresnel Color
: List (float, float, float)Conserve Energy
: bool
Metalness
subroutine fields:
Metalness Map
: mset.TextureChannel
: int (0
: R,1
: G,2
: B,3
: A)Metalness
: float (0.0
to1.0
)Invert
: bool
Adv. Metalness
subroutine fields:
Metalness Map
: mset.TextureChannel
: int (0
: R,1
: G,2
: B,3
: A)Metalness
: float (0.0
to1.0
)Invert
: boolSpecular Level Map
: mset.TextureChannel;advMtlMask
: int (0
: R,1
: G,2
: B,3
: A)Specular
: float (0.0
to0.16
)Invert
: boolSpecular Curve
: bool
Refractive Index
subroutine fields:
Index Map
: mset.TextureIndex
: float (1.0
to5.0
)Index Hue
: List (float, float, float)Extinction
: float (0.0
to10.0
)Extinction Hue
: List (float, float, float)
Dota Specular
subroutine fields:
Specular Mask
: mset.TextureChannel;specMask
: int (0
: R,1
: G,2
: B,3
: A)Rimlight Mask
: mset.TextureChannel;rimMask
: int (0
: R,1
: G,2
: B,3
: A)Tint Mask
: mset.TextureChannel;tintMask
: int (0
: R,1
: G,2
: B,3
: A)Specular Exponent;map
: mset.TextureChannel;expMask
: int (0
: R,1
: G,2
: B,3
: A)Specular Exponent
: float (1.0
to512.0
)Specular Scale
: float (0.0
to30.0
)Specular Tint
: List (float, float, float)Rim Light Scale
: float (0.0
to5.0
)Rim Light Tint
: List (float, float, float)
Mirror
subroutine fields:
Horizon Occlusion
: float (0.0
to4.0
)Secondary Intensity
: float (0.0
to1.0
)Secondary Intensity Color
: List (float, float, float)Secondary Fresnel
: float (0.0
to1.0
)Secondary Fresnel Color
: List (float, float, float)
Blinn-Phong
subroutine fields:
Horizon Occlusion
: floatSecondary Gloss
: floatSecondary Intensity
: floatSecondary Intensity Color
: List (float, float, float)Secondary Fresnel
: floatSecondary Fresnel Color
: List (float, float, float)
GGX
subroutine fields:
Horizon Occlusion
: float (0.0
to4.0
)Secondary Gloss
: float (0.0
to4.0
)Secondary Intensity
: float (0.0
to4.0
)Secondary Intensity Color
: List (float, float, float)Secondary Fresnel
: float (0.0
to1.0
)Secondary Fresnel Color
: List (float, float, float)
Anisotropic
subroutine fields:
Horizon Occlusion
: float (0.0
to4.0
)Secondary Gloss
: float (0.0
to4.0
)Secondary Intensity
: float (0.0
to4.0
)Secondary Intensity Color
: List (float, float, float)Secondary Fresnel
: float (0.0
to1.0
)Secondary Fresnel Color
: List (float, float, float)Direction Map
: mset.TextureScale & Bias
: boolSwap X/Y Direction
: boolAnisotropy
: float (0.0
to1.0
)Anisotropy Direction
: float (0.0
to360.0
)Refraction Shift
: float (-1.0
to1.0
)
Newton's Rings
subroutine fields:
Thickness Map
: mset.TextureStrength
: float (0.0
to1.0
)Film Thickness (nm)
: float (1.0
to39000.0
)Minimum Thickness (nm)
: float (1.0
to39000.0
)
Flat
subroutine fields:
Tessellation
: float (0.0
to2048.0
)
PN Triangles
subroutine fields:
Tessellation
: float (0.0
to2048.0
)Smoothing
: float (0.0
to1.0
)
Normals
subroutine fields:
Normal Map
: mset.TextureScale & Bias
: boolFlip X
: boolFlip Y
: boolFlip Z
: boolObject Space
: bool
Detail Normals
subroutine fields:
Normal Map
: mset.TextureScale & Bias
: boolFlip X
: boolFlip Y
: boolFlip Z
: boolObject Space
: boolDetail Normal Map
: mset.TextureUV Set
: int (0
or1
)Scale & Bias;detail
: boolFlip X;detail
: boolFlip Y;detail
: boolFlip Z;detail
: boolDetail Tiling
: float (1.0
to40.0
)Detail Offset
: float (0.0
to1.0
)Detail Weight Map
: mset.TextureChannel;detail
: int (0
: R,1
: G,2
: B,3
: A)Detail Weight
: float (0.0
to1.0
)
Parallax
subroutine fields:
Normal Map
: mset.TextureScale & Bias
: boolFlip X
: boolFlip Y
: boolFlip Z
: boolObject Space
: boolHeight Map
: mset.TextureChannel
: int (0
: R,1
: G,2
: B,3
: A)Depth
: float (0.0
to0.5
)Depth Center
: float (0.0
to1.0
)
Cutout
subroutine fields:
Use Albedo Alpha
: boolAlpha Map
: mset.TextureChannel
: int (0
: R,1
: G,2
: B,3
: A)Alpha
: float (0.0
to1.0
)Threshold
: float (0.0
to1.0
)
Dither
subroutine fields:
Use Albedo Alpha
: boolAlpha Map
: mset.TextureChannel
: int (0
: R,1
: G,2
: B,3
: A)Alpha
: float (0.0
to1.0
)
Add
subroutine fields:
Use Albedo Alpha
: boolAlpha Map
: mset.TextureChannel
: int (0
: R,1
: G,2
: B,3
: A)Alpha
: float (0.0
to1.0
)Tint
: List (float, float, float)Include Diffuse
: bool
Refraction
subroutine fields:
Index of Refraction
: float (1.0
to3.0
)Distant Background
: boolUse Microsurface
: boolTint
: List (float, float, float)Albedo Tint
: boolCaustics
: float (0.0
to1.0
)Mask
: mset.TextureChannel;mask
: int (0
: R,1
: G,2
: B,3
: A)Cutout
: mset.TextureChannel;cutout
: int (0
: R,1
: G,2
: B,3
: A)Use Albedo Alpha
: boolUse Dither
: bool
Substance
subroutine fields:
SubstanceFile
Custom
subroutine fields:
ShaderFilePath
ReloadSeed