Class MaterialProvider.MaterialKey
- java.lang.Object
-
- com.google.android.filament.gltfio.MaterialProvider.MaterialKey
-
- Enclosing interface:
- MaterialProvider
public static class MaterialProvider.MaterialKey extends java.lang.ObjectMaterialKey specifies the requirements for a requested glTF material. The provider creates Filament materials that fulfill these requirements.
-
-
Field Summary
Fields Modifier and Type Field Description intalphaModeintaoUVintbaseColorUVintclearCoatNormalUVintclearCoatRoughnessUVintclearCoatUVbooleandoubleSidedintemissiveUVbooleanenableDiagnosticsbooleanhasBaseColorTexturebooleanhasClearCoatbooleanhasClearCoatNormalTexturebooleanhasClearCoatRoughnessTexturebooleanhasClearCoatTexturebooleanhasEmissiveTexturebooleanhasIORbooleanhasMetallicRoughnessTexturebooleanhasNormalTexturebooleanhasOcclusionTexturebooleanhasSheenbooleanhasSheenColorTexturebooleanhasSheenRoughnessTexturebooleanhasTextureTransformsbooleanhasTransmissionbooleanhasTransmissionTexturebooleanhasVertexColorsbooleanhasVolumeThicknessTextureintmetallicRoughnessUVintnormalUVintsheenColorUVintsheenRoughnessUVinttransmissionUVbooleanunlitbooleanuseSpecularGlossinessintvolumeThicknessUV
-
Constructor Summary
Constructors Constructor Description MaterialKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconstrainMaterial(int[] uvmap)Populate UV map according to the material key, altering latter if required.
-
-
-
Field Detail
-
doubleSided
public boolean doubleSided
-
unlit
public boolean unlit
-
hasVertexColors
public boolean hasVertexColors
-
hasBaseColorTexture
public boolean hasBaseColorTexture
-
hasNormalTexture
public boolean hasNormalTexture
-
hasOcclusionTexture
public boolean hasOcclusionTexture
-
hasEmissiveTexture
public boolean hasEmissiveTexture
-
useSpecularGlossiness
public boolean useSpecularGlossiness
-
alphaMode
public int alphaMode
-
enableDiagnostics
public boolean enableDiagnostics
-
hasMetallicRoughnessTexture
public boolean hasMetallicRoughnessTexture
-
metallicRoughnessUV
public int metallicRoughnessUV
-
baseColorUV
public int baseColorUV
-
hasClearCoatTexture
public boolean hasClearCoatTexture
-
clearCoatUV
public int clearCoatUV
-
hasClearCoatRoughnessTexture
public boolean hasClearCoatRoughnessTexture
-
clearCoatRoughnessUV
public int clearCoatRoughnessUV
-
hasClearCoatNormalTexture
public boolean hasClearCoatNormalTexture
-
clearCoatNormalUV
public int clearCoatNormalUV
-
hasClearCoat
public boolean hasClearCoat
-
hasTransmission
public boolean hasTransmission
-
hasTextureTransforms
public boolean hasTextureTransforms
-
emissiveUV
public int emissiveUV
-
aoUV
public int aoUV
-
normalUV
public int normalUV
-
hasTransmissionTexture
public boolean hasTransmissionTexture
-
transmissionUV
public int transmissionUV
-
hasSheenColorTexture
public boolean hasSheenColorTexture
-
sheenColorUV
public int sheenColorUV
-
hasSheenRoughnessTexture
public boolean hasSheenRoughnessTexture
-
sheenRoughnessUV
public int sheenRoughnessUV
-
hasVolumeThicknessTexture
public boolean hasVolumeThicknessTexture
-
volumeThicknessUV
public int volumeThicknessUV
-
hasSheen
public boolean hasSheen
-
hasIOR
public boolean hasIOR
-
-
Method Detail
-
constrainMaterial
public void constrainMaterial(@NonNull @Size(min=8L) int[] uvmap)Populate UV map according to the material key, altering latter if required. Filament supports up to 2 UV sets. glTF has arbitrary texcoord set indices, but it allows implementations to support only 2 simultaneous sets. Here we build a mapping table with 1-based indices where 0 means unused. Note that the order in which we drop textures can affect the look of certain assets. This "order of degradation" is stipulated by the glTF 2.0 specification.- Parameters:
uvmap- Output argument that gets populated with a small table that maps from a glTF uv index to a Filament uv index (0 = UNUSED, 1 = UV0, 2 = UV1).
-
-