Class HighDefinitionRPMaterialGenerator
Implements
Inherited Members
Namespace: GLTFast.Materials
Assembly: glTFast.dll
Syntax
public class HighDefinitionRPMaterialGenerator : ShaderGraphMaterialGenerator, IMaterialGenerator
Fields
CullModeForwardProperty
_CullModeForward shader property identifier
Declaration
public static readonly int CullModeForwardProperty
Field Value
| Type | Description |
|---|---|
| int |
DistortionVectorsPass
DistortionVectors shader pass name
Declaration
public const string DistortionVectorsPass = "DistortionVectors"
Field Value
| Type | Description |
|---|---|
| string |
MetallicStackLitShader
Name of the stack lit shader graph used for advanced PBR materials
Declaration
public const string MetallicStackLitShader = "glTF-pbrMetallicRoughnessStackLit"
Field Value
| Type | Description |
|---|---|
| string |
MetallicStackLitShaderGuid
GUID of the stack lit shader graph used for advanced PBR materials
Declaration
public const string MetallicStackLitShaderGuid = "429ab83ee9ef05b4f8a76e58ea5d5ad4"
Field Value
| Type | Description |
|---|---|
| string |
Methods
GenerateMaterial(MaterialBase, IGltfReadable, bool)
Converts a glTF material into a Unity Material. gltfMaterial might reference textures, which can be queried from gltf.
Declaration
public override Material GenerateMaterial(MaterialBase gltfMaterial, IGltfReadable gltf, bool pointsSupport = false)
Parameters
| Type | Name | Description |
|---|---|---|
| MaterialBase | gltfMaterial | Source glTF material |
| IGltfReadable | gltf | Interface to a loaded glTF's resources (e.g. textures) |
| bool | pointsSupport | If true, material has to support meshes with points topology. |
Returns
| Type | Description |
|---|---|
| Material | Generated Unity Material |
Overrides
GetMetallicShader(MetallicShaderFeatures)
Picks more advanced StackLit based shader graph, if any material feature requires it.
Declaration
protected override Shader GetMetallicShader(ShaderGraphMaterialGenerator.MetallicShaderFeatures features)
Parameters
| Type | Name | Description |
|---|---|---|
| ShaderGraphMaterialGenerator.MetallicShaderFeatures | features | Material features |
Returns
| Type | Description |
|---|---|
| Shader | Shader capable of rendering the features |
Overrides
SetAlphaModeMask(MaterialBase, Material)
Declaration
protected override void SetAlphaModeMask(MaterialBase gltfMaterial, Material material)
Parameters
| Type | Name | Description |
|---|---|---|
| MaterialBase | gltfMaterial | |
| Material | material |
Overrides
SetDoubleSided(MaterialBase, Material)
Declaration
protected override void SetDoubleSided(MaterialBase gltfMaterial, Material material)
Parameters
| Type | Name | Description |
|---|---|---|
| MaterialBase | gltfMaterial | |
| Material | material |
Overrides
SetShaderModeBlend(MaterialBase, Material)
Declaration
protected override void SetShaderModeBlend(MaterialBase gltfMaterial, Material material)
Parameters
| Type | Name | Description |
|---|---|---|
| MaterialBase | gltfMaterial | |
| Material | material |