Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    MaterialDisplacementMapFeature Class

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

    The displacement map for a surface material feature.

    System.Object → MaterialFeature → MaterialDisplacementMapFeature
    Derived from MaterialDisplacementMapFeature:

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

    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.

    | Improve this Doc View Source

    Fields


    DisplacementStream

    public const string DisplacementStream = "matDisplacement"
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    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

    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
    Type Description
    DisplacementMapStage
    | Improve this Doc View Source

    Methods


    GenerateShader(MaterialGeneratorContext)

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

    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
    In This Article
    • Constructors
      • MaterialDisplacementMapFeature()
      • MaterialDisplacementMapFeature(IComputeScalar)
    • Fields
      • DisplacementStream
    • Properties
      • DisplacementMap
      • Intensity
      • ScaleAndBias
      • Stage
    • Methods
      • GenerateShader(MaterialGeneratorContext)
    • Inherited Members
    • Extension Methods

    Back to top

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