public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)ShadingModel;
         hashCode = (hashCode * 397) ^ SpecularExponent1.GetHashCode();
         hashCode = (hashCode * 397) ^ SpecularColor1.GetHashCode();
         hashCode = (hashCode * 397) ^ SpecularScale1.GetHashCode();
         hashCode = (hashCode * 397) ^ SpecularExponent2.GetHashCode();
         hashCode = (hashCode * 397) ^ SpecularColor2.GetHashCode();
         hashCode = (hashCode * 397) ^ SpecularScale2.GetHashCode();
         hashCode = (hashCode * 397) ^ SpecularShiftRatio.GetHashCode();
         hashCode = (hashCode * 397) ^ ScalesAngle.GetHashCode();
         hashCode = (hashCode * 397) ^ ShiftNoiseScale.GetHashCode();
         hashCode = (hashCode * 397) ^ GlintsNoiseStrength.GetHashCode();
         hashCode = (hashCode * 397) ^ AlphaThreshold.GetHashCode();
         hashCode = (hashCode * 397) ^ HairSpecularHighlightsShiftNoise.GetHashCode();
         hashCode = (hashCode * 397) ^ HairSecondarySpecularGlintsNoise.GetHashCode();
         hashCode = (hashCode * 397) ^ HairDirectionFunction.GetHashCode();
         hashCode = (hashCode * 397) ^ HairShadowingFunction.GetHashCode();
         hashCode = (hashCode * 397) ^ LightAttenuationFunction.GetHashCode();
         hashCode = (hashCode * 397) ^ Environment.GetHashCode();
         return(hashCode);
     }
 }
        private void AddSecondarySpecularGlintsNoiseTexture(MaterialGeneratorContext context, ShaderMixinSource shaderSource)
        {
            MaterialComputeColorKeys materialComputeColorKeys = new MaterialComputeColorKeys(SecondarySpecularReflectionNoiseTexture,
                                                                                             SecondarySpecularReflectionNoiseValue);
            var computeColorSource = HairSecondarySpecularGlintsNoise.GenerateShaderSource(context, materialComputeColorKeys);

            shaderSource.AddComposition("SecondarySpecularGlintsNoiseTexture", computeColorSource);
        }
 public bool Equals(MaterialSpecularHairModelFeature other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(ShadingModel == other.ShadingModel && SpecularExponent1.Equals(other.SpecularExponent1) && SpecularColor1.Equals(other.SpecularColor1) && SpecularScale1.Equals(other.SpecularScale1) && SpecularExponent2.Equals(other.SpecularExponent2) && SpecularColor2.Equals(other.SpecularColor2) && SpecularScale2.Equals(other.SpecularScale2) && SpecularShiftRatio.Equals(other.SpecularShiftRatio) && ScalesAngle.Equals(other.ScalesAngle) && ShiftNoiseScale.Equals(other.ShiftNoiseScale) && GlintsNoiseStrength.Equals(other.GlintsNoiseStrength) && AlphaThreshold.Equals(other.AlphaThreshold) && HairSpecularHighlightsShiftNoise.Equals(other.HairSpecularHighlightsShiftNoise) && HairSecondarySpecularGlintsNoise.Equals(other.HairSecondarySpecularGlintsNoise) && HairDirectionFunction.Equals(other.HairDirectionFunction) && HairShadowingFunction.Equals(other.HairShadowingFunction) && LightAttenuationFunction.Equals(other.LightAttenuationFunction) && Environment.Equals(other.Environment));
 }