/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Ambient != null) { hashCode = hashCode * 59 + Ambient.GetHashCode(); } if (Diffuse != null) { hashCode = hashCode * 59 + Diffuse.GetHashCode(); } if (Specular != null) { hashCode = hashCode * 59 + Specular.GetHashCode(); } if (Roughness != null) { hashCode = hashCode * 59 + Roughness.GetHashCode(); } if (Fresnel != null) { hashCode = hashCode * 59 + Fresnel.GetHashCode(); } return(hashCode); } }