Class MaterialDisplacementMapFeature
The displacement map for a surface material feature.
[DataContract("MaterialDisplacementMapFeature")]
[Display("Displacement Map", null)]
public class MaterialDisplacementMapFeature : MaterialFeature, IMaterialDisplacementFeature, IMaterialFeature, IMaterialShaderGenerator
  - Inheritance
 - 
      objectMaterialDisplacementMapFeature
 
- Implements
 
- Inherited Members
 
Constructors
MaterialDisplacementMapFeature()
Initializes a new instance of the MaterialDisplacementMapFeature class.
public MaterialDisplacementMapFeature()
  MaterialDisplacementMapFeature(IComputeScalar)
Initializes a new instance of the MaterialDisplacementMapFeature class.
public MaterialDisplacementMapFeature(IComputeScalar displacementMap)
  Parameters
displacementMapIComputeScalarThe displacement map.
Fields
DisplacementStream
public const string DisplacementStream = "matDisplacement"
  Field Value
Properties
DisplacementMap
Gets or sets the displacement map.
[DataMember(10)]
[Display("Displacement Map", null)]
public IComputeScalar DisplacementMap { get; set; }
  Property Value
- IComputeScalar
 The displacement map.
Intensity
Gets or sets the displacement map.
[DataMember(20)]
[Display("Intensity", null)]
public IComputeScalar Intensity { get; set; }
  Property Value
- IComputeScalar
 The displacement map.
ScaleAndBias
Gets or sets a value indicating whether to scale by (2,2,2) and bias by (-1,-1,-1) the displacement map.
[DataMember(30)]
[Display("Scale & Bias", null)]
public bool ScaleAndBias { get; set; }
  Property Value
- bool
 trueif scale and bias this displacement map; otherwise,false.
Stage
Gets or sets a value indicating in which stage the displacement should occur.
[DataMember(40)]
[Display("Shader Stage", null)]
public DisplacementMapStage Stage { get; set; }
  Property Value
Methods
GenerateShader(MaterialGeneratorContext)
Generates the shader for the feature.
public override void GenerateShader(MaterialGeneratorContext context)
  Parameters
contextMaterialGeneratorContextThe context.