Representation of the material in the Mono domain MBMaterial provides methods related to texture, shader, and other material properties.
Inherits TaleWorlds.Engine.Resource.
|
enum | MBTextureType {
DiffuseMap
,
DiffuseMap2
,
BumpMap
,
EnvironmentMap
,
SpecularMap
} |
| Types of texture regarding its usage in the related shader. More...
|
|
enum | MBAlphaBlendMode : byte {
None
,
Modulate
,
AddAlpha
,
Multiply
,
Add
,
Max
,
Factor
,
AddModulateCombined
,
NoAlphaBlendNoWrite
,
ModulateNoWrite
,
GbufferAlphaBlend
,
GbufferAlphaBlendwithVtResolve
} |
| Types of alpha blend modes available for MBMaterial. More...
|
|
|
string | Name [get, set] |
| Gets Name of the material This property is read only.
|
|
bool | UsingSpecular [get, set] |
| Property defining the usage of specular light component.
|
|
bool | UsingSpecularMap [get, set] |
| Property defining the usage of specular map for specular reflection calculations UsingSpecular should be 'true' for this property to take effect.
|
|
bool | UsingEnvironmentMap [get, set] |
| Property defining the usage of environment map.
|
|
bool | UsingSpecularAlpha [get, set] |
| Property defining the usage of specular alpha.
|
|
bool | UsingDynamicLight [get, set] |
| Property defining whether dynamic lights will effect this material or not.
|
|
bool | UsingSunLight [get, set] |
| Property defining whether sun light will effect this material or not.
|
|
bool | UsingFresnel [get, set] |
| Property defining the usage of fresnel effect on this material.
|
|
bool | IsSunShadowReceiver [get, set] |
| Property defining whether shadows due to sun light will fall on this material.
|
|
bool | IsDynamicShadowReceiver [get, set] |
| Property defining whether dynamic shadows will fall on this material.
|
|
bool | UsingDiffuseAlphaMap [get, set] |
| Property defining the usage of diffuse alpha map.
|
|
bool | UsingParallaxMapping [get, set] |
| Property defining the usage of parallax mapping.
|
|
bool | UsingParallaxOcclusion [get, set] |
| Property defining the usage of parallax occlusion.
|
|
MaterialFlags | Flags [get, set] |
|
bool | IsValid [get] |
|
|
| Resource () |
|
void | CheckResourceParameter (Resource param, string paramName="") |
| Check if the parameter 'param' is null or invalid and throws an exception containing 'paramName' as further information.
|
|
◆ MBTextureType
Enumerator |
---|
DiffuseMap | |
DiffuseMap2 | |
BumpMap | |
EnvironmentMap | |
SpecularMap | |
◆ MBAlphaBlendMode
Enumerator |
---|
None | |
Modulate | |
AddAlpha | |
Multiply | |
Add | |
Max | |
Factor | |
AddModulateCombined | |
NoAlphaBlendNoWrite | |
ModulateNoWrite | |
GbufferAlphaBlend | |
GbufferAlphaBlendwithVtResolve | |
◆ GetDefaultMaterial()
static Material TaleWorlds.Engine.Material.GetDefaultMaterial |
( |
| ) |
|
|
static |
◆ GetOutlineMaterial()
static Material TaleWorlds.Engine.Material.GetOutlineMaterial |
( |
Mesh |
mesh | ) |
|
|
static |
◆ GetDefaultTableauSampleMaterial()
static Material TaleWorlds.Engine.Material.GetDefaultTableauSampleMaterial |
( |
bool |
transparency | ) |
|
|
static |
◆ CreateTableauMaterial()
◆ CreateCopy()
Material TaleWorlds.Engine.Material.CreateCopy |
( |
| ) |
|
◆ GetFromResource()
static Material TaleWorlds.Engine.Material.GetFromResource |
( |
string |
materialName | ) |
|
|
static |
- Parameters
-
materialName | Name of the material to get |
- Returns
- Returns the MBMaterial representation of the material named 'materialName'. Returns the previously retrieved instance. A new instance is created if there is none previously or its has been GCed. Returns null if there is no material named 'materialName'
◆ SetShader()
void TaleWorlds.Engine.Material.SetShader |
( |
Shader |
shader | ) |
|
- Parameters
-
shader | Shader object to be set as the material shader |
◆ GetShader()
Shader TaleWorlds.Engine.Material.GetShader |
( |
| ) |
|
- Returns
- Returns the material shader Returns null if no shader is assigned to this material
◆ GetShaderFlags()
UInt64 TaleWorlds.Engine.Material.GetShaderFlags |
( |
| ) |
|
◆ SetShaderFlags()
void TaleWorlds.Engine.Material.SetShaderFlags |
( |
UInt64 |
flagEntry | ) |
|
◆ SetMeshVectorArgument()
void TaleWorlds.Engine.Material.SetMeshVectorArgument |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
w |
|
) |
| |
◆ SetTexture()
- Parameters
-
textureType | The texture type. |
texture | Texture to be assigned to the texture slot specified by 'textureType' |
◆ SetTextureAtSlot()
void TaleWorlds.Engine.Material.SetTextureAtSlot |
( |
int |
textureSlot, |
|
|
Texture |
texture |
|
) |
| |
◆ SetAreaMapScale()
void TaleWorlds.Engine.Material.SetAreaMapScale |
( |
float |
scale | ) |
|
◆ SetEnableSkinning()
void TaleWorlds.Engine.Material.SetEnableSkinning |
( |
bool |
enable | ) |
|
◆ UsingSkinning()
bool TaleWorlds.Engine.Material.UsingSkinning |
( |
| ) |
|
◆ GetTexture()
- Parameters
-
textureType | Defines the texture type slot whose texture assignment will be returned |
- Returns
- Returns the texture assigned to 'textureType' slot Returns null if there is no texture assigned to the specified slot
◆ GetTextureWithSlot()
Texture TaleWorlds.Engine.Material.GetTextureWithSlot |
( |
int |
textureSlot | ) |
|
◆ GetAlphaMaskTableauMaterial()
static Material TaleWorlds.Engine.Material.GetAlphaMaskTableauMaterial |
( |
| ) |
|
|
static |
◆ GetAlphaBlendMode()
- Returns
- Returns the alpha blend mode of the material
◆ SetAlphaBlendMode()
void TaleWorlds.Engine.Material.SetAlphaBlendMode |
( |
MBAlphaBlendMode |
alphaBlendMode | ) |
|
- Parameters
-
alphaBlendMode | The alpha blend mode. |
◆ SetAlphaTestValue()
void TaleWorlds.Engine.Material.SetAlphaTestValue |
( |
float |
alphaTestValue | ) |
|
- Parameters
-
alphaTestValue | The alpha blend value, from 0 to 1 |
◆ GetAlphaTestValue()
float TaleWorlds.Engine.Material.GetAlphaTestValue |
( |
| ) |
|
◆ AddMaterialShaderFlag()
void TaleWorlds.Engine.Material.AddMaterialShaderFlag |
( |
String |
flagName, |
|
|
bool |
showErrors |
|
) |
| |
◆ Name
string TaleWorlds.Engine.Material.Name |
|
getset |
◆ UsingSpecular
bool TaleWorlds.Engine.Material.UsingSpecular |
|
getset |
◆ UsingSpecularMap
bool TaleWorlds.Engine.Material.UsingSpecularMap |
|
getset |
◆ UsingEnvironmentMap
bool TaleWorlds.Engine.Material.UsingEnvironmentMap |
|
getset |
◆ UsingSpecularAlpha
bool TaleWorlds.Engine.Material.UsingSpecularAlpha |
|
getset |
◆ UsingDynamicLight
bool TaleWorlds.Engine.Material.UsingDynamicLight |
|
getset |
◆ UsingSunLight
bool TaleWorlds.Engine.Material.UsingSunLight |
|
getset |
◆ UsingFresnel
bool TaleWorlds.Engine.Material.UsingFresnel |
|
getset |
◆ IsSunShadowReceiver
bool TaleWorlds.Engine.Material.IsSunShadowReceiver |
|
getset |
◆ IsDynamicShadowReceiver
bool TaleWorlds.Engine.Material.IsDynamicShadowReceiver |
|
getset |
◆ UsingDiffuseAlphaMap
bool TaleWorlds.Engine.Material.UsingDiffuseAlphaMap |
|
getset |
◆ UsingParallaxMapping
bool TaleWorlds.Engine.Material.UsingParallaxMapping |
|
getset |
◆ UsingParallaxOcclusion
bool TaleWorlds.Engine.Material.UsingParallaxOcclusion |
|
getset |
◆ Flags