Beispiel #1
0
 private MaterialNormalTextureInfo _GetNormalTexture(bool create)
 {
     if (create && _normalTexture == null)
     {
         _normalTexture = new MaterialNormalTextureInfo();
     }
     return(_normalTexture);
 }
Beispiel #2
0
        protected override void DeserializeProperty(string jsonPropertyName, ref Utf8JsonReader reader)
        {
            switch (jsonPropertyName)
            {
            case "clearcoatFactor": _clearcoatFactor = DeserializePropertyValue <Double?>(ref reader); break;

            case "clearcoatNormalTexture": _clearcoatNormalTexture = DeserializePropertyValue <MaterialNormalTextureInfo>(ref reader); break;

            case "clearcoatRoughnessFactor": _clearcoatRoughnessFactor = DeserializePropertyValue <Double?>(ref reader); break;

            case "clearcoatRoughnessTexture": _clearcoatRoughnessTexture = DeserializePropertyValue <TextureInfo>(ref reader); break;

            case "clearcoatTexture": _clearcoatTexture = DeserializePropertyValue <TextureInfo>(ref reader); break;

            default: base.DeserializeProperty(jsonPropertyName, ref reader); break;
            }
        }
Beispiel #3
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;
            }
        }