MaterialNormalMapFeature Class
Namespace: Stride.Rendering.MaterialsAssembly: 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
Name | Description | |
---|---|---|
Constructors | ||
MaterialNormalMapFeature() | Initializes a new instance of the MaterialNormalMapFeature class. |
|
MaterialNormalMapFeature(IComputeColor) | Initializes a new instance of the MaterialNormalMapFeature class. |
|
Fields | ||
DefaultNormalColor | ||
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). |
|
NormalMap | Gets or sets the normal map. |
|
ScaleAndBias | Gets or sets a value indicating whether to scale by (2,2) and offset by (-1,-1) the normal map. |
|
Methods | ||
GenerateShader(MaterialGeneratorContext) | ||
GetStreams() |
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
Type | Name | Description |
---|---|---|
IComputeColor | normalMap | The normal map. |
Fields
DefaultNormalColor
public static readonly Color DefaultNormalColor
Field Value
Type | Description |
---|---|
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
Type | Description |
---|---|
System.Boolean |
|
NormalMap
Gets or sets the normal map.
[DataMember(10)]
[Display("Normal Map", null)]
public IComputeColor NormalMap { get; set; }
Property Value
Type | Description |
---|---|
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
Type | Description |
---|---|
System.Boolean |
|
Methods
GenerateShader(MaterialGeneratorContext)
public override void GenerateShader(MaterialGeneratorContext context)
Parameters
Type | Name | Description |
---|---|---|
MaterialGeneratorContext | context |
Overrides
GetStreams()
public IEnumerable<MaterialStreamDescriptor> GetStreams()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MaterialStreamDescriptor> |