Click or drag to resize
AB4D logo

StandardMaterial Class

StandardMaterial is a material that defines the standard properties to show the diffuse, specular and emissive material properties.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXSharedDXResource
      Ab3d.DirectXSharedDXDeviceResource
        Ab3d.DirectXMaterial
          Ab3d.DirectX.MaterialsStandardMaterial

Namespace: Ab3d.DirectX.Materials
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public class StandardMaterial : Material, 
	IDiffuseMaterial, ITransparentMaterial, IDiffuseTextureMaterial, ISpecularMaterial, IEmissiveMaterial, 
	ITwoSidedMaterial

The StandardMaterial type exposes the following members.

Constructors
 NameDescription
Public methodStandardMaterial Constructor
Public methodStandardMaterial(Color4) StandardMaterial constructor with diffuse color and alpha specified in Color4 struct.
Public methodStandardMaterial(Color3, Single) StandardMaterial constructor with a diffuse color and an alpha value (alpha is 1 when not specified)
Public methodStandardMaterial(ShaderResourceView, Boolean) StandardMaterial constructor with diffuse texture specified with textureShaderResourceView
Top
Properties
 NameDescription
Public propertyAlpha Gets or sets a float value that defines the alpha value for the material.
Public propertyAlphaClipThreshold Pixels with alpha color values below this value will be clipped (not rendered and their depth will not be written to depth buffer). Expected values are between 0 and 1. When 0 (by default) then alpha clipping is disabled - this means that also pixels with alpha value 0 are fully processed (they are not visible but its depth value is still written so objects that are rendered afterwards and are behind the pixel will not be visible).
Public propertyAmbientColor Gets or sets a Color3 that specifies an color that defines how much ambient color is reflected by this material.
Public propertyDiffuseColor Gets or sets a Color3 that specifies the diffuse color of this material.
Public propertyDiffuseTextures Gets or sets an array of ShaderResourceView objects that define the textures. Note: setting ShaderResourceView objects to StandardMaterial does not increase reference count on the ShaderResourceView objects. This means that you should not dispose ShaderResourceView objects after they are set to this StandardMaterial.
Public propertyEmissiveColor Gets or sets a Color3 that that represents the emissive color - the color of the object regardless of the lights.
Public propertyHasOnlyEmissiveColor Gets or sets a Boolean that specifies if this material has only emissive color. If false than other material properties are also defined.
Public propertyHasSpecularColor Gets a boolean that specifies if this material is using specular effect.
Public propertyHasTransparency Gets or sets a boolean that specifies if this material is semi-transparent and needs to be alpha blended with the scene.
Public propertyIsPreMultipliedAlphaColor When IsPreMultipliedAlphaColor is true (false by default) and Alpha is less then 1, then the color components of the DiffuseColor are already multiplied with alpha value to produce pre-multiplied colors. When false, then non-pre-multiplied color is converted in pre-multiplied color when this is required by the shader.
Public propertyIsTwoSided Gets or sets a Boolean that specifies if the material should be rendered on both front and back side. Default value is false.
Public propertySamplerStates Gets or sets an array of SamplerState objects that define the state of the samplers. Note: setting SamplerStates objects to StandardMaterial does not increase reference count on the SamplerStates objects. This means that you should not dispose SamplerStates objects after they are set to this StandardMaterial.
Public propertySpecularColor Gets or sets the Color3 that specifies the color used to draw the specular highlight effect.
Public propertySpecularPower Gets or sets a float that specifies the power of the specular effect. Zero values means that the specular effect is turned off.
Public propertyTextureBlendState Gets a BlendState that is used to render the texture. If null a CommonStates.Opaque will be used.
Public propertyTextureResourceName Gets or sets a string that can be used to specify the name of the texture - this can be a file name of the texture file.
Top
Methods
 NameDescription
Public methodToString ToString
(Overrides MaterialToString)
Top
See Also