TriLib 2.2.8
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
TriLibCore.URP.Mappers.UniversalRPMaterialMapper Class Reference

Represents a Material Mapper that converts TriLib Materials into Unity UniversalRP Materials. More...

Inheritance diagram for TriLibCore.URP.Mappers.UniversalRPMaterialMapper:
TriLibCore.Mappers.MaterialMapper

Public Member Functions

override bool IsCompatible (MaterialMapperContext materialMapperContext)
 Determines whether this Mapper is compatible with the given Material Renderer Context.
 
override void Map (MaterialMapperContext materialMapperContext)
 Starts the mapping process, comparing the Mapper Properties against the source Material ones.
 
override string GetDiffuseTextureName (MaterialMapperContext materialMapperContext)
 Gets the Diffuse Texture Property name.
 
override string GetGlossinessOrRoughnessTextureName (MaterialMapperContext materialMapperContext)
 Gets the Glossiness or Roughness Texture Property name.
 
override string GetDiffuseColorName (MaterialMapperContext materialMapperContext)
 Gets the Diffuse Color Property name.
 
override string GetEmissionColorName (MaterialMapperContext materialMapperContext)
 Gets the Emission Color Property name.
 
override string GetGlossinessOrRoughnessName (MaterialMapperContext materialMapperContext)
 Gets the Glossiness or Roughness Property name.
 
override string GetMetallicName (MaterialMapperContext materialMapperContext)
 Gets the Metallic Property name.
 
override string GetMetallicTextureName (MaterialMapperContext materialMapperContext)
 Gets the Metallic Texture Property name.
 
- Public Member Functions inherited from TriLibCore.Mappers.MaterialMapper
virtual bool IsCompatible (MaterialMapperContext materialMapperContext)
 Determines whether this Mapper is compatible with the given Material Renderer Context.
 
virtual void Map (MaterialMapperContext materialMapperContext)
 Starts the mapping process, comparing the Mapper Properties against the source Material ones.
 
void ApplyMaterialToRenderer (MaterialRendererContext materialRendererContext)
 Applies Material to the Renderer using the context data.
 
virtual string GetDiffuseTextureName (MaterialMapperContext materialMapperContext)
 Gets the Diffuse Texture Property name.
 
virtual string GetDiffuseColorName (MaterialMapperContext materialMapperContext)
 Gets the Diffuse Color Property name.
 
virtual string GetEmissionColorName (MaterialMapperContext materialMapperContext)
 Gets the Emission Color Property name.
 
virtual string GetGlossinessOrRoughnessName (MaterialMapperContext materialMapperContext)
 Gets the Glossiness or Roughness Property name.
 
virtual string GetMetallicName (MaterialMapperContext materialMapperContext)
 Gets the Metallic Property name.
 
virtual string GetGlossinessOrRoughnessTextureName (MaterialMapperContext materialMapperContext)
 Gets the Glossiness or Roughness Texture Property name.
 
virtual string GetMetallicTextureName (MaterialMapperContext materialMapperContext)
 Gets the Metallic Texture Property name.
 

Properties

override Material MaterialPreset [get]
 
override Material CutoutMaterialPreset [get]
 
override Material TransparentMaterialPreset [get]
 
override Material TransparentComposeMaterialPreset [get]
 
override Material LoadingMaterial [get]
 
override bool ExtractMetallicAndSmoothness [get]
 
- Properties inherited from TriLibCore.Mappers.MaterialMapper
static List< string > RegisteredMappers [get]
 Default Material Mappers list.
 
static List< string > RegisteredMapperNamespaces [get]
 Default Material Mappers namespace list.
 
virtual bool ExtractMetallicAndSmoothness = true [get]
 Turn off this field to disable metallic and smoothness textures extraction.
 
virtual Material MaterialPreset [get]
 Standard Material preset to instantiate.
 
virtual Material CutoutMaterialPreset [get]
 Cutout material preset.
 
virtual Material TransparentMaterialPreset [get]
 Transparent (alpha) material preset.
 
virtual Material TransparentComposeMaterialPreset [get]
 Compose (secondary) material preset to use when AssetLoaderOptions.AlphaMaterialMode is set to CutoutAndTransparent.
 
virtual Material MaterialPresetNoMetallicTexture [get]
 
virtual Material CutoutMaterialPresetNoMetallicTexture [get]
 
virtual Material TransparentMaterialPresetNoMetallicTexture [get]
 
virtual Material TransparentComposeMaterialPresetNoMetallicTexture [get]
 
virtual Material SpecularMaterialPreset [get]
 
virtual Material SpecularCutoutMaterialPreset [get]
 
virtual Material SpecularTransparentMaterialPreset [get]
 
virtual Material SpecularTransparentComposeMaterialPreset [get]
 
virtual Material AutodeskMaterialPreset [get]
 
virtual Material AutodeskCutoutMaterialPreset [get]
 
virtual Material AutodeskTransparentMaterialPreset [get]
 
virtual Material AutodeskTransparentComposeMaterialPreset [get]
 
virtual Material LoadingMaterial [get]
 Gets the loading Material preset for this Mapper.
 

Additional Inherited Members

- Public Attributes inherited from TriLibCore.Mappers.MaterialMapper
bool ForceStandardMaterial = false
 Force the usage of the Standard Material preset?
 
int CheckingOrder
 Priority when testing the compatibility of this Mapper. Lower priority Mappers will be tested later.
 
- Static Public Attributes inherited from TriLibCore.Mappers.MaterialMapper
static Action< TextureLoadingContextCreateTextureCallback
 
static Action< TextureLoadingContextLoadTextureCallback
 
static Action< TextureLoadingContextScanForAlphaPixelsCallback
 
static Action< TextureLoadingContextApplyTextureCallback
 
static Action< TextureLoadingContextFixNPOTTextureCallback
 
static Action< TextureLoadingContextFixNormalMapCallback
 
static Action< TextureLoadingContextPostProcessTextureCallback
 The method to call when the Mapper has to post-process a Texture data.
 
- Protected Member Functions inherited from TriLibCore.Mappers.MaterialMapper
void LoadTextureWithCallbacks (MaterialMapperContext materialMapperContext, TextureType textureType, ITexture texture, params Action< TextureLoadingContext >[] onTextureProcessed)
 Loads a Texture using callbacks to be called on the main Thread later.
 
void BuildMaterial (MaterialMapperContext materialMapperContext)
 Creates the final Unity Material using the given context data.
 
- Static Protected Member Functions inherited from TriLibCore.Mappers.MaterialMapper
static void CheckTextureOffsetAndScaling (TextureLoadingContext textureLoadingContext)
 Applies the Texture scaling and offset, when applicable.
 
static void CheckTextureOffsetAndScaling (MaterialMapperContext materialMapperContext, ITexture texture, bool textureLoaded)
 

Detailed Description

Represents a Material Mapper that converts TriLib Materials into Unity UniversalRP Materials.

Member Function Documentation

◆ GetDiffuseColorName()

override string TriLibCore.URP.Mappers.UniversalRPMaterialMapper.GetDiffuseColorName ( MaterialMapperContext  materialMapperContext)
virtual

Gets the Diffuse Color Property name.

Parameters
materialMapperContextThe source Material Mapper Context, containing the Virtual Material and Unity Material.

Reimplemented from TriLibCore.Mappers.MaterialMapper.

◆ GetDiffuseTextureName()

override string TriLibCore.URP.Mappers.UniversalRPMaterialMapper.GetDiffuseTextureName ( MaterialMapperContext  materialMapperContext)
virtual

Gets the Diffuse Texture Property name.

Parameters
materialMapperContextThe source Material Mapper Context, containing the Virtual Material and Unity Material.

Reimplemented from TriLibCore.Mappers.MaterialMapper.

◆ GetEmissionColorName()

override string TriLibCore.URP.Mappers.UniversalRPMaterialMapper.GetEmissionColorName ( MaterialMapperContext  materialMapperContext)
virtual

Gets the Emission Color Property name.

Parameters
materialMapperContextThe source Material Mapper Context, containing the Virtual Material and Unity Material.

Reimplemented from TriLibCore.Mappers.MaterialMapper.

◆ GetGlossinessOrRoughnessName()

override string TriLibCore.URP.Mappers.UniversalRPMaterialMapper.GetGlossinessOrRoughnessName ( MaterialMapperContext  materialMapperContext)
virtual

Gets the Glossiness or Roughness Property name.

Parameters
materialMapperContextThe source Material Mapper Context, containing the Virtual Material and Unity Material.

Reimplemented from TriLibCore.Mappers.MaterialMapper.

◆ GetGlossinessOrRoughnessTextureName()

override string TriLibCore.URP.Mappers.UniversalRPMaterialMapper.GetGlossinessOrRoughnessTextureName ( MaterialMapperContext  materialMapperContext)
virtual

Gets the Glossiness or Roughness Texture Property name.

Parameters
materialMapperContextThe source Material Mapper Context, containing the Virtual Material and Unity Material.

Reimplemented from TriLibCore.Mappers.MaterialMapper.

◆ GetMetallicName()

override string TriLibCore.URP.Mappers.UniversalRPMaterialMapper.GetMetallicName ( MaterialMapperContext  materialMapperContext)
virtual

Gets the Metallic Property name.

Parameters
materialMapperContextThe source Material Mapper Context, containing the Virtual Material and Unity Material.

Reimplemented from TriLibCore.Mappers.MaterialMapper.

◆ GetMetallicTextureName()

override string TriLibCore.URP.Mappers.UniversalRPMaterialMapper.GetMetallicTextureName ( MaterialMapperContext  materialMapperContext)
virtual

Gets the Metallic Texture Property name.

Parameters
materialMapperContextThe source Material Mapper Context, containing the Virtual Material and Unity Material.

Reimplemented from TriLibCore.Mappers.MaterialMapper.

◆ IsCompatible()

override bool TriLibCore.URP.Mappers.UniversalRPMaterialMapper.IsCompatible ( MaterialMapperContext  materialMapperContext)
virtual

Determines whether this Mapper is compatible with the given Material Renderer Context.

Parameters
materialMapperContextThe source Material Mapper Context, containing the Virtual Material and Unity Material.
Returns
true if this Mapper is compatible with the given Material Renderer Context, otherwise, false.

Reimplemented from TriLibCore.Mappers.MaterialMapper.

◆ Map()

override void TriLibCore.URP.Mappers.UniversalRPMaterialMapper.Map ( MaterialMapperContext  materialMapperContext)
virtual

Starts the mapping process, comparing the Mapper Properties against the source Material ones.

Parameters
materialMapperContextThe source Material Mapper Context, containing the Virtual Material and Unity Material.

Reimplemented from TriLibCore.Mappers.MaterialMapper.