-
public class MaterialProvider.MaterialKeyMaterialKey specifies the requirements for a requested glTF material.The provider creates Filament materials that fulfill these requirements.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MaterialProvider.MaterialKey()
-
Method Summary
Modifier and Type Method Description voidconstrainMaterial(@NonNull() @Size(min = 8) Array<int> uvmap)Populate UV map according to the material key, altering latter if required.Filament supports up to 2 UV sets. -
-
Method Detail
-
constrainMaterial
void constrainMaterial(@NonNull() @Size(min = 8) Array<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 itallows implementations to support only 2 simultaneous sets. Here we build a mappingtable with 1-based indices where 0 means unused. Note that the order in which we droptextures can affect the look of certain assets. This "order of degradation" isstipulated by the glTF 2.0 specification.
- Parameters:
uvmap- Output argument that gets populated with a small table that maps from aglTF uv index to a Filament uv index (0 = UNUSED, 1 = UV0, 2 = UV1).
-
-
-
-