Пример #1
0
 private MaterialOcclusionTextureInfo _GetOcclusionTexture(bool create)
 {
     if (create && _occlusionTexture == null)
     {
         _occlusionTexture = new MaterialOcclusionTextureInfo();
     }
     return(_occlusionTexture);
 }
Пример #2
0
        protected override void DeserializeProperty(string jsonPropertyName, JsonReader reader)
        {
            switch (jsonPropertyName)
            {
            case "alphaCutoff": _alphaCutoff = DeserializePropertyValue <Double?>(reader); break;

            case "alphaMode": _alphaMode = DeserializePropertyValue <AlphaMode>(reader); break;

            case "doubleSided": _doubleSided = DeserializePropertyValue <Boolean?>(reader); break;

            case "emissiveFactor": _emissiveFactor = DeserializePropertyValue <Vector3?>(reader); break;

            case "emissiveTexture": _emissiveTexture = DeserializePropertyValue <TextureInfo>(reader); break;

            case "normalTexture": _normalTexture = DeserializePropertyValue <MaterialNormalTextureInfo>(reader); break;

            case "occlusionTexture": _occlusionTexture = DeserializePropertyValue <MaterialOcclusionTextureInfo>(reader); break;

            case "pbrMetallicRoughness": _pbrMetallicRoughness = DeserializePropertyValue <MaterialPBRMetallicRoughness>(reader); break;

            default: base.DeserializeProperty(jsonPropertyName, reader); break;
            }
        }