MaterialDisplacementMapFeature Class
Namespace: Stride.Rendering.MaterialsAssembly: Stride.Rendering.dll
The displacement map for a surface material feature.
[DataContract("MaterialDisplacementMapFeature")]
[Display("Displacement Map", null)]
public class MaterialDisplacementMapFeature : MaterialFeature, IMaterialDisplacementFeature, IMaterialFeature, IMaterialShaderGenerator
Name | Description | |
---|---|---|
Constructors | ||
MaterialDisplacementMapFeature() | Initializes a new instance of the MaterialDisplacementMapFeature class. |
|
MaterialDisplacementMapFeature(IComputeScalar) | Initializes a new instance of the MaterialDisplacementMapFeature class. |
|
Fields | ||
DisplacementStream | ||
Properties | ||
DisplacementMap | Gets or sets the displacement map. |
|
Intensity | Gets or sets 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. |
|
Stage | Gets or sets a value indicating in which stage the displacement should occur. |
|
Methods | ||
GenerateShader(MaterialGeneratorContext) |
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
Type | Name | Description |
---|---|---|
IComputeScalar | displacementMap | The displacement map. |
Fields
DisplacementStream
public const string DisplacementStream = "matDisplacement"
Field Value
Type | Description |
---|---|
System.String |
Properties
DisplacementMap
Gets or sets the displacement map.
[DataMember(10)]
[Display("Displacement Map", null)]
public IComputeScalar DisplacementMap { get; set; }
Property Value
Type | Description |
---|---|
IComputeScalar | The displacement map. |
Intensity
Gets or sets the displacement map.
[DataMember(20)]
[Display("Intensity", null)]
public IComputeScalar Intensity { get; set; }
Property Value
Type | Description |
---|---|
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
Type | Description |
---|---|
System.Boolean |
|
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
Type | Description |
---|---|
DisplacementMapStage |
Methods
GenerateShader(MaterialGeneratorContext)
public override void GenerateShader(MaterialGeneratorContext context)
Parameters
Type | Name | Description |
---|---|---|
MaterialGeneratorContext | context |