|
|
@@ -17,32 +17,28 @@ namespace SharpGLTF.Schema2
|
|
|
{
|
|
|
if (this._pbrMetallicRoughness == null) this._pbrMetallicRoughness = new MaterialPBRMetallicRoughness();
|
|
|
|
|
|
- this.RemoveExtensions<MaterialPBRSpecularGlossiness>();
|
|
|
this.RemoveExtensions<MaterialUnlit>();
|
|
|
this.RemoveExtensions<MaterialClearCoat>();
|
|
|
+ this.RemoveExtensions<MaterialPBRSpecularGlossiness>();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// Initializes this <see cref="Material"/> instance with PBR Specular Glossiness attributes.
|
|
|
+ /// Initializes this <see cref="Material"/> instance with PBR Metallic Roughness attributes and Clear Coat extension.
|
|
|
/// </summary>
|
|
|
- /// <param name="useFallback">true to add a PBRMetallicRoughness fallback material.</param>
|
|
|
- public void InitializePBRSpecularGlossiness(bool useFallback = false)
|
|
|
+ public void InitializePBRMetallicRoughnessClearCoat()
|
|
|
{
|
|
|
- if (useFallback)
|
|
|
- {
|
|
|
- if (this._pbrMetallicRoughness == null) this._pbrMetallicRoughness = new MaterialPBRMetallicRoughness();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- this._pbrMetallicRoughness = null;
|
|
|
- }
|
|
|
+ if (this._pbrMetallicRoughness == null) this._pbrMetallicRoughness = new MaterialPBRMetallicRoughness();
|
|
|
|
|
|
this.RemoveExtensions<MaterialUnlit>();
|
|
|
- this.RemoveExtensions<MaterialClearCoat>();
|
|
|
- this.SetExtension(new MaterialPBRSpecularGlossiness(this));
|
|
|
+ this.RemoveExtensions<MaterialPBRSpecularGlossiness>();
|
|
|
+ this.SetExtension(new MaterialClearCoat(this));
|
|
|
}
|
|
|
|
|
|
- public void InitializeClearCoat(bool useFallback = false)
|
|
|
+ /// <summary>
|
|
|
+ /// Initializes this <see cref="Material"/> instance with PBR Specular Glossiness attributes.
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="useFallback">true to add a PBRMetallicRoughness fallback material.</param>
|
|
|
+ public void InitializePBRSpecularGlossiness(bool useFallback = false)
|
|
|
{
|
|
|
if (useFallback)
|
|
|
{
|
|
|
@@ -54,8 +50,8 @@ namespace SharpGLTF.Schema2
|
|
|
}
|
|
|
|
|
|
this.RemoveExtensions<MaterialUnlit>();
|
|
|
- this.RemoveExtensions<MaterialPBRSpecularGlossiness>();
|
|
|
- this.SetExtension(new MaterialClearCoat(this));
|
|
|
+ this.RemoveExtensions<MaterialClearCoat>();
|
|
|
+ this.SetExtension(new MaterialPBRSpecularGlossiness(this));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|