Class GltfMaterialExporter
Converts Unity Materials that use a glTFast shader to glTF materials
Implements
Inherited Members
Namespace: GLTFast.Export
Assembly: glTFast.Export.dll
Syntax
public abstract class GltfMaterialExporter : MaterialExportBase, IMaterialExport
Methods
ConvertMaterial(Material, out Material, IGltfWritable, ICodeLogger)
Declaration
public override bool ConvertMaterial(Material unityMaterial, out Schema.Material material, IGltfWritable gltf, ICodeLogger logger)
Parameters
Type | Name | Description |
---|---|---|
Material | unityMaterial | |
Material | material | |
IGltfWritable | gltf | |
ICodeLogger | logger |
Returns
Type | Description |
---|---|
bool |
GetAlphaCutoff(Material)
Returns that material's alpha cutoff threshold.
Declaration
protected abstract float GetAlphaCutoff(Material material)
Parameters
Type | Name | Description |
---|---|---|
Material | material | Unity material. |
Returns
Type | Description |
---|---|
float | Alpha cutoff threshold value. |
See Also
GetAlphaMode(Material)
Extracts the glTF alpha mode from a Unity material.
Declaration
protected abstract MaterialBase.AlphaMode GetAlphaMode(Material material)
Parameters
Type | Name | Description |
---|---|---|
Material | material | Unity material. |
Returns
Type | Description |
---|---|
AlphaMode | glTF alpha mode. |
See Also
IsDoubleSided(Material)
Indicates whether (back-face) culling should be disabled.
Declaration
protected abstract bool IsDoubleSided(Material material)
Parameters
Type | Name | Description |
---|---|---|
Material | material | Unity material. |
Returns
Type | Description |
---|---|
bool | True if material does not do back-face culling. False otherwise. |