Transparent Materials: mudanças entre as edições

De TriLib
Ir para navegação Ir para pesquisar
Sem resumo de edição
Sem resumo de edição
Linha 1: Linha 1:
TriLib can handle transparent materials differently, so if your material is not loaded correctly, you could try changing your "AssetLoaderOptions" instance "AlphaMaterialMode" field.
TriLib can handle transparent materials differently, so if your material is not loaded correctly, you could try changing your <code>AssetLoaderOptions</code> instance <code>AlphaMaterialMode</code> field.





Edição das 09h08min de 18 de maio de 2024

TriLib can handle transparent materials differently, so if your material is not loaded correctly, you could try changing your AssetLoaderOptions instance AlphaMaterialMode field.


There are three possible values for this field:

  • Cutout:
    In "Cutout" material mode, TriLib will set the material Rendering Mode to "Transparent" whenever an alpha texture/material is found. Cutout materials can cast shadows, and uses depth test.
  • Transparent:
    In "Transparent" material mode, TriLib will set the material Rendering Mode to "Transparent" whenever an alpha texture/material is found. Transparent materials can't cast shadows and don't uses depth pass.
  • CutoutAndTransparent:
    In "CutoutAndTransparent" alpha material mode, TriLib will create an extra mesh whenever an alpha texture/material is found. The underlying mesh will use a material with the "Transparent" Rendering Mode, and the overlying mesh will use the "Cutout" Rendering Mode.
    This alpha material mode is suitable when your object is composed of textures that are partially transparent, but should cast shadows and be use depth test.
    *You can control the ratio between what is considered opaque/transparent modifying the included TriLib materials.

*Included TriLib materials can be found in the following folders:

  • TriLib/Resources/Materials/Standard/Standard
  • TriLibHDRP/Resources/Materials/HDRP/Standard
  • TriLibUniversalRP/Resources/Materials/UniversalRP/Standard