{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class MaterialGenerator | Unity glTFast | 6.0.1
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MaterialGenerator

    Common base class for implementations of IMaterialGenerator

    Inheritance
    object
    MaterialGenerator
    ShaderGraphMaterialGenerator
    Implements
    IMaterialGenerator
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: GLTFast.Materials
    Assembly: solution.dll
    Syntax
    public abstract class MaterialGenerator : IMaterialGenerator

    Fields

    Name Description
    AlphaCutoffProperty

    Shader property ID for property alphaCutoff

    AlphaTestOnKeyword

    Shader keyword _ALPHATEST_ON

    BaseColorProperty

    Shader property ID for property baseColorFactor

    BaseColorTextureProperty

    Shader property ID for property baseColorTexture

    BaseColorTextureRotationProperty

    Shader property ID for property baseColorTexture_Rotation

    BaseColorTextureScaleTransformProperty

    Shader property ID for property baseColorTexture_ST

    BaseColorTextureTexCoordProperty

    Shader property ID for property baseColorTexture_texCoord

    CullModeProperty

    Shader property ID for property _CullMode

    CullProperty

    Shader property ID for property _Cull

    DefaultMaterialName

    When a glTF mesh(primitive) has no material assigned, a default material, has to get created and assigned. This default material should get named after this field's value to ensure future round-trip workflows are functioning.

    DiffuseFactorProperty

    Shader property ID for property diffuseFactor

    DiffuseTextureProperty

    Shader property ID for property diffuseTexture

    DiffuseTextureRotationProperty

    Shader property ID for property diffuseTexture_Rotation

    DiffuseTextureScaleTransformProperty

    Shader property ID for property diffuseTexture_ST

    DiffuseTextureTexCoordProperty

    Shader property ID for property diffuseTexture_texCoord

    DstBlendProperty

    Shader property ID for property _DstBlend

    EmissiveFactorProperty

    Shader property ID for property emissiveFactor

    EmissiveTextureProperty

    Shader property ID for property emissiveTexture

    EmissiveTextureRotationProperty

    Shader property ID for property emissiveTexture_Rotation

    EmissiveTextureScaleTransformProperty

    Shader property ID for property emissiveTexture_ST

    EmissiveTextureTexCoordProperty

    Shader property ID for property emissiveTexture_texCoord

    FadeRenderType

    Render type Fade value

    GlossinessFactorProperty

    Shader property ID for property glossinessFactor

    MetallicProperty

    Shader property ID for property metallicFactor

    MetallicRoughnessMapProperty

    Shader property ID for property metallicRoughnessTexture

    MetallicRoughnessMapRotationProperty

    Shader property ID for property metallicRoughnessTexture_Rotation

    MetallicRoughnessMapScaleTransformProperty

    Shader property ID for property metallicRoughnessTexture_ST

    MetallicRoughnessMapUVChannelProperty

    Shader property ID for property metallicRoughnessTexture_texCoord

    NormalTextureProperty

    Shader property ID for property normalTexture

    NormalTextureRotationProperty

    Shader property ID for property normalTexture_Rotation

    NormalTextureScaleProperty

    Shader property ID for property normalTexture_scale

    NormalTextureScaleTransformProperty

    Shader property ID for property normalTexture_ST

    NormalTextureTexCoordProperty

    Shader property ID for property normalTexture_texCoord

    OcclusionTextureProperty

    Shader property ID for property occlusionTexture

    OcclusionTextureRotationProperty

    Shader property ID for property occlusionTexture_Rotation

    OcclusionTextureScaleTransformProperty

    Shader property ID for property occlusionTexture_ST

    OcclusionTextureStrengthProperty

    Shader property ID for property occlusionTexture_strength

    OcclusionTextureTexCoordProperty

    Shader property ID for property occlusionTexture_texCoord

    OpaqueRenderType

    Render type Opaque value

    RenderTypeTag

    Render type key

    RoughnessFactorProperty

    Shader property ID for property roughnessFactor

    SpecularFactorProperty

    Shader property ID for property specularFactor

    SpecularGlossinessTextureProperty

    Shader property ID for property specularGlossinessTexture

    SpecularGlossinessTextureRotationProperty

    Shader property ID for property specularGlossinessTexture_Rotation

    SpecularGlossinessTextureScaleTransformProperty

    Shader property ID for property specularGlossinessTexture_ST

    SpecularGlossinessTextureTexCoordProperty

    Shader property ID for property specularGlossinessTexture_texCoord

    SrcBlendProperty

    Shader property ID for property _SrcBlend

    TextureTransformKeyword

    Shader keyword _TEXTURE_TRANSFORM

    TransparentCutoutRenderType

    Render type TransparentCutout value

    TransparentRenderType

    Render type Transparent value

    UVChannelSelectKeyword

    Shader keyword _UV_CHANNEL_SELECT

    ZWriteProperty

    Shader property ID for property _ZWrite

    Properties

    Name Description
    Logger

    Logger to be used for messaging. Can be null!

    Methods

    Name Description
    FindShader(string, ICodeLogger)

    Tries to load a shader and covers error handling.

    GenerateDefaultMaterial(bool)

    Creates a fallback material to be assigned to nodes without a material.

    GenerateMaterial(MaterialBase, IGltfReadable, bool)

    Converts a glTF material into a Unity Material. gltfMaterial might reference textures, which can be queried from gltf.

    GetDefaultMaterial(bool)

    Get fallback material that is assigned to nodes without a material.

    GetDefaultMaterialGenerator()

    Provides the default material generator that's being used if no custom material generator was provided. The result depends on the currently used render pipeline.

    SetLogger(ICodeLogger)

    Has to be called prior to GenerateMaterial(MaterialBase, IGltfReadable, bool). The logger can be used to inform users about incidents of arbitrary severity (error,warning or info) during material generation.

    TransmissionWorkaroundShaderMode(Transmission, ref Color)

    Approximates Transmission material effect for Render Pipelines / Shaders where filtering the backbuffer is not possible.

    TrySetTexture(TextureInfoBase, Material, IGltfReadable, int, int, int, int)

    Attempts assigning a glTF texture to a Unity material.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)