Struct XMaterial
- Namespace
- OmegaEngine.Graphics
- Assembly
- OmegaEngine.dll
A combination of textures and lighting parameters.
public struct XMaterial
- Inherited Members
- Extension Methods
Remarks
Constructors
XMaterial(ITextureProvider?)
public XMaterial(ITextureProvider? diffuse)
Parameters
diffuseITextureProvider
XMaterial(Color)
A combination of textures and lighting parameters.
public XMaterial(Color color)
Parameters
colorColorThe color of the material when hit by diffuse light (normal lighting).
Remarks
Fields
DiffuseMaps
The diffuse textures maps
public readonly ITextureProvider?[] DiffuseMaps
Field Value
Properties
Ambient
The color of the material when lit by ambient/background light (always active)
public Color Ambient { readonly get; set; }
Property Value
D3DMaterial
A DirectX material with the color information from this XMaterial
public Material D3DMaterial { get; }
Property Value
- Material
DefaultMaterial
A plain white untextured material
public static XMaterial DefaultMaterial { get; }
Property Value
Diffuse
The color of the material when hit by diffuse light (normal lighting)
public Color Diffuse { readonly get; set; }
Property Value
Emissive
The color of the light this material emits by itself
public Color Emissive { readonly get; set; }
Property Value
EmissiveFactor
A shader-specific parameter controlling the application of emissive lighting (usually how much emissive light is muted by diffuse and specular light)
public float EmissiveFactor { readonly get; set; }
Property Value
EmissiveMap
The emissive (which spots are self-shining without an external light source)
public ITextureProvider? EmissiveMap { readonly get; set; }
Property Value
Glow
The color of this material glows in, bleeding over edges
public Color Glow { readonly get; set; }
Property Value
GlowMap
The glow map (which spots glow, bleeding over edges)
public ITextureProvider? GlowMap { readonly get; set; }
Property Value
HeightMap
The height map (an optional addition to the normal map)
public ITextureProvider? HeightMap { readonly get; set; }
Property Value
IsTextured
Indicates whether this material uses textures
public bool IsTextured { get; }
Property Value
NeedsTBN
Indicates whether this material requires TBN (tangent, bitangent, normal) vectors
public bool NeedsTBN { get; }
Property Value
NormalMap
The normal map (i.e. bump map)
public ITextureProvider? NormalMap { readonly get; set; }
Property Value
Specular
The color of specular (shiny) highlights on the material surface
public Color Specular { readonly get; set; }
Property Value
SpecularMap
The specular map (which spots are "shiny")
public ITextureProvider? SpecularMap { readonly get; set; }
Property Value
SpecularPower
The sharpness of specular highlights (lower value = sharper)
public float SpecularPower { readonly get; set; }
Property Value
Methods
HoldReference()
Calls HoldReference() for all contained XTextures.
public readonly void HoldReference()
ReleaseReference()
Calls ReleaseReference() for all contained XTextures.
public void ReleaseReference()
Operators
implicit operator XMaterial(XTexture)
public static implicit operator XMaterial(XTexture texture)
Parameters
textureXTexture