Table of Contents

Class MaterialDisplacementMapFeature

Namespace
Stride.Rendering.Materials
Assembly
Stride.Rendering.dll

The displacement map for a surface material feature.

[DataContract("MaterialDisplacementMapFeature")]
[Display("Displacement Map", null)]
public class MaterialDisplacementMapFeature : MaterialFeature, IMaterialDisplacementFeature, IMaterialFeature, IMaterialShaderGenerator
Inheritance
MaterialDisplacementMapFeature
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

displacementMap IComputeScalar

The displacement map.

Fields

DisplacementStream

public const string DisplacementStream = "matDisplacement"

Field Value

string

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

true if 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

DisplacementMapStage

Methods

GenerateShader(MaterialGeneratorContext)

Generates the shader for the feature.

public override void GenerateShader(MaterialGeneratorContext context)

Parameters

context MaterialGeneratorContext

The context.