Table of Contents

Class MaterialSpecularHairModelFeature

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

The microfacet specular shading model.

[DataContract("MaterialSpecularHairModelFeature")]
[Display("Hair", null)]
public class MaterialSpecularHairModelFeature : MaterialFeature, IMaterialSpecularModelFeature, IMaterialShadingModelFeature, IMaterialFeature, IMaterialShaderGenerator, IEquatable<IMaterialShadingModelFeature>, IEquatable<MaterialSpecularHairModelFeature>
Inheritance
MaterialSpecularHairModelFeature
Implements
Inherited Members

Properties

AlphaThreshold

Defines the value used in the alpha test.

[DataMember(135)]
[DataMemberRange(0, 1, 1, 2, 2)]
[Display("Alpha threshold", null)]
public float AlphaThreshold { get; set; }

Property Value

float

DebugRenderPasses

Enables/disables color coding of each render pass.

[DataMember(30)]
[Display("Debug render passes", null)]
public bool DebugRenderPasses { get; set; }

Property Value

bool

Environment

[DataMember(220)]
[Display("Environment (DFG)", null)]
public IMaterialSpecularMicrofacetEnvironmentFunction Environment { get; set; }

Property Value

IMaterialSpecularMicrofacetEnvironmentFunction

GlintsNoiseStrength

[DataMember(132)]
[DataMemberRange(0, 1, 1, 2, 2)]
[Display("Glints noise strength", null)]
public float GlintsNoiseStrength { get; set; }

Property Value

float

HairDirectionFunction

Defines whether the tangent or bitangent vectors represent the hair strands direction.

[DataMember(180)]
[Display("Hair direction", null)]
public IMaterialHairDirectionFunction HairDirectionFunction { get; set; }

Property Value

IMaterialHairDirectionFunction

HairSecondarySpecularGlintsNoise

The texure that is multiplied with the secondary specular reflections to give them a sparkling look.

[DataMember(150)]
[Display("Secondary specular noise", null)]
public IComputeScalar HairSecondarySpecularGlintsNoise { get; set; }

Property Value

IComputeScalar

HairShadowingFunction

Defines whether to use traditional shadow mapping or subsurface scattering for shadowing the hair.

[DataMember(181)]
[Display("Shadowing type", null)]
public IMaterialHairShadowingFunction HairShadowingFunction { get; set; }

Property Value

IMaterialHairShadowingFunction

HairSpecularHighlightsShiftNoise

This texture is used to shift the two specular highlights to break the uniform look of the hair.

[DataMember(140)]
[Display("Specular shift texture", null)]
public IComputeScalar HairSpecularHighlightsShiftNoise { get; set; }

Property Value

IComputeScalar

IsLightDependent

public bool IsLightDependent { get; }

Property Value

bool

LightAttenuationFunction

Additional light attenuation.

[DataMember(210)]
[Display("Light attenuation", null)]
public IMaterialHairLightAttenuationFunction LightAttenuationFunction { get; set; }

Property Value

IMaterialHairLightAttenuationFunction

ScalesAngle

Controls the shift of the primary and secondary specular reflections.

[DataMember(127)]
[Display("Hair scales angle", null)]
[DataMemberRange(0, 25, 1, 2, 2)]
public float ScalesAngle { get; set; }

Property Value

float

ShadingModel

The shading model to use for the hair shading.

[DataMember(40)]
[Display("Shading model", null)]
public HairShared.HairShadingModel ShadingModel { get; set; }

Property Value

HairShared.HairShadingModel

ShiftNoiseScale

Scale that gets multiplied with the noise value produced by HairSpecularHighlightsShiftNoise.

[DataMember(131)]
[DataMemberRange(0, 10, 1, 2, 2)]
[Display("Shift noise strength", null)]
public float ShiftNoiseScale { get; set; }

Property Value

float

SpecularColor1

Color of the primary specular reflecton.

[DataMember(80)]
[Display("Primary specular reflection color", null)]
public Color3 SpecularColor1 { get; set; }

Property Value

Color3

SpecularColor2

Color of the secondary specular reflecton.

[DataMember(110)]
[Display("Secondary specular reflection color", null)]
public Color3 SpecularColor2 { get; set; }

Property Value

Color3

SpecularExponent1

Exponent of the primary specular highlight.

[DataMember(70)]
[DataMemberRange(1, 1000, 1, 2, 2)]
[Display("Primary specular reflection exponent", null)]
public float SpecularExponent1 { get; set; }

Property Value

float

SpecularExponent2

Exponent of the secondary specular highlight.

[DataMember(100)]
[DataMemberRange(1, 1000, 1, 2, 2)]
[Display("Secondary specular reflection exponent", null)]
public float SpecularExponent2 { get; set; }

Property Value

float

SpecularScale1

Strength of the primary specular reflection.

[DataMember(90)]
[DataMemberRange(0, 1, 1, 2, 3)]
[Display("Primary specular reflection strength", null)]
public float SpecularScale1 { get; set; }

Property Value

float

SpecularScale2

Strength of the secondary specular reflection.

[DataMember(120)]
[DataMemberRange(0, 1, 1, 2, 3)]
[Display("Secondary specular reflection strength", null)]
public float SpecularScale2 { get; set; }

Property Value

float

SpecularShiftRatio

Controls the offset between the primary and secondary reflections.

[DataMember(125)]
[DataMemberRange(0, 3, 1, 2, 2)]
[Display("Secondary reflection shift ratio", null)]
public float SpecularShiftRatio { get; set; }

Property Value

float

Methods

Equals(IMaterialShadingModelFeature)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(IMaterialShadingModelFeature other)

Parameters

other IMaterialShadingModelFeature

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(MaterialSpecularHairModelFeature)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(MaterialSpecularHairModelFeature other)

Parameters

other MaterialSpecularHairModelFeature

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GenerateShader(MaterialGeneratorContext)

Generates the shader for the feature.

public override void GenerateShader(MaterialGeneratorContext context)

Parameters

context MaterialGeneratorContext

The context.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MultipassGeneration(MaterialGeneratorContext)

Called during prepass, used to enumerate extra passes.

public override void MultipassGeneration(MaterialGeneratorContext context)

Parameters

context MaterialGeneratorContext

The context.