This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Material
ousttrue edited this page Aug 17, 2018
·
20 revisions
- https://github.com/ousttrue/UniGLTF/issues/12
- https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-material
- https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md
GLTF | Unity | |
---|---|---|
/materials/*/pbrMetallicRoughness/baseColorFactor |
material.color |
shorthand of material.SetColor("_Color", color)
|
/materials/*/pbrMetallicRoughness/baseColorTexture |
material.mainTexture |
shorthand of material.SetTexture("_MainTex", texture)
|
Unity RenderType Tag | glTFのmaterial.alphaModeプロパティ |
---|---|
Opaque | OPAQUE (デフォルトなので出力は不要) |
Transparent | BLEND |
TransparentCutout | MASK |
- doubleSided=true
- vertexColor
baseColorFactor | baseColorTexture | alpha mode | Unity shader |
---|---|---|---|
o | OPAQUE | Unlit/Color | |
o | OPAQUE | Unlit/Texture | |
o | o | OPAQUE | require custom shader |
o | BLEND | require custom shader | |
o | BLEND | Unlit/Transparent | |
o | o | BLEND | require custom shader |
o | CUTOUT | ---- | |
o | CUTOUT | Unlit/Transparent Cutout | |
o | o | CUTOUT | require custom shader |