Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    MaterialNormalMapFeature Class

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

    The normal map for a surface material feature.

    System.Object → MaterialFeature → MaterialNormalMapFeature
    Derived from MaterialNormalMapFeature:

    [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()
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    Fields


    DefaultNormalColor

    public static readonly Color DefaultNormalColor
    Field Value
    Type Description
    Color
    | Improve this Doc View Source

    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

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

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

    | Improve this Doc View Source

    Methods


    GenerateShader(MaterialGeneratorContext)

    public override void GenerateShader(MaterialGeneratorContext context)
    Parameters
    Type Name Description
    MaterialGeneratorContext context
    Overrides
    MaterialFeature.GenerateShader(MaterialGeneratorContext)

    GetStreams()

    public IEnumerable<MaterialStreamDescriptor> GetStreams()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<MaterialStreamDescriptor>

    Inherited Members

    MaterialFeature.Enabled
    MaterialFeature.Visit(MaterialGeneratorContext)
    MaterialFeature.MultipassGeneration(MaterialGeneratorContext)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation