Table of Contents

Class MaterialNormalMapFeature

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

The normal map for a surface material feature.

[DataContract("MaterialNormalMapFeature")]
[Display("Normal Map", null)]
public class MaterialNormalMapFeature : MaterialFeature, IMaterialSurfaceFeature, IMaterialFeature, IMaterialShaderGenerator, IMaterialStreamProvider
Inheritance
MaterialNormalMapFeature
Implements
Inherited Members

Constructors

MaterialNormalMapFeature()

Initializes a new instance of the MaterialNormalMapFeature class.

public MaterialNormalMapFeature()

MaterialNormalMapFeature(IComputeColor)

Initializes a new instance of the MaterialNormalMapFeature class.

public MaterialNormalMapFeature(IComputeColor normalMap)

Parameters

normalMap IComputeColor

The normal map.

Fields

DefaultNormalColor

public static readonly Color DefaultNormalColor

Field Value

Color

Properties

IsXYNormal

Gets or sets a value indicating whether the normal is only stored in XY components and Z is assumed to be sqrt(1 - xx - yy).

[DataMember(30)]
[Display("Reconstruct Z", null)]
public bool IsXYNormal { get; set; }

Property Value

bool

true if this instance is xy normal; otherwise, false.

NormalMap

Gets or sets the normal map.

[DataMember(10)]
[Display("Normal Map", null)]
public IComputeColor NormalMap { get; set; }

Property Value

IComputeColor

The normal map.

ScaleAndBias

Gets or sets a value indicating whether to scale by (2,2) and offset by (-1,-1) the normal map.

[DataMember(20)]
[Display("Scale & Offset", null)]
public bool ScaleAndBias { get; set; }

Property Value

bool

true if scale and offset this normal map; otherwise, false.

Methods

GenerateShader(MaterialGeneratorContext)

Generates the shader for the feature.

public override void GenerateShader(MaterialGeneratorContext context)

Parameters

context MaterialGeneratorContext

The context.

GetStreams()

Gets the streams used by a material

public IEnumerable<MaterialStreamDescriptor> GetStreams()

Returns

IEnumerable<MaterialStreamDescriptor>

IEnumerable<MaterialStream>.