Пример #1
0
        public BabylonPBRMaterial(BabylonPBRMetallicRoughnessMaterial origin) : this((BabylonPBRBaseSimpleMaterial)origin)
        {
            useRoughnessFromMetallicTextureAlpha = false;
            useRoughnessFromMetallicTextureGreen = true;
            useMetallnessFromMetallicTextureBlue = true;

            roughness           = origin.roughness;
            metallic            = origin.metallic;
            reflectivityTexture = origin.metallicRoughnessTexture;
        }
Пример #2
0
        public BabylonPBRMaterial(BabylonPBRMetallicRoughnessMaterial origin) : base(origin.id)
        {
            SetCustomType("BABYLON.PBRMaterial");
            directIntensity      = 1.0f;
            emissiveIntensity    = 1.0f;
            environmentIntensity = 1.0f;
            specularIntensity    = 1.0f;
            cameraExposure       = 1.0f;
            cameraContrast       = 1.0f;

            useRadianceOverAlpha      = true;
            useSpecularOverAlpha      = true;
            usePhysicalLightFalloff   = true;
            useEmissiveAsIllumination = true;

            useRoughnessFromMetallicTextureAlpha = false;
            useRoughnessFromMetallicTextureGreen = true;
            useMetallnessFromMetallicTextureBlue = true;

            ambient      = new[] { 0f, 0f, 0f };
            reflectivity = new[] { 1f, 1f, 1f };
            reflection   = new[] { 1f, 1f, 1f };

            maxSimultaneousLights = 4;

            albedoTexture         = origin.baseTexture;
            alpha                 = origin.alpha;
            alphaCutOff           = origin.alphaCutOff;
            alphaMode             = origin.alphaMode;
            backFaceCulling       = origin.backFaceCulling;
            albedo                = origin.baseColor;
            albedoTexture         = origin.baseTexture;
            clearCoat             = origin.clearCoat;
            disableLighting       = origin.disableLighting;
            twoSidedLighting      = origin.doubleSided;
            emissive              = origin.emissive;
            emissiveTexture       = origin.emissiveTexture;
            invertNormalMapX      = origin.invertNormalMapX;
            invertNormalMapY      = origin.invertNormalMapY;
            isUnlit               = origin.isUnlit;
            maxSimultaneousLights = origin.maxSimultaneousLights;
            metallic              = origin.metallic;
            reflectivityTexture   = origin.metallicRoughnessTexture;
            name                   = origin.name;
            bumpTexture            = origin.normalTexture;
            ambientTextureStrength = origin.occlusionStrength;
            ambientTexture         = origin.occlusionTexture;
            roughness              = origin.roughness;
            transparencyMode       = origin.transparencyMode;
            wireframe              = origin.wireframe;
        }
 public BabylonPBRMetallicRoughnessMaterial(BabylonPBRMetallicRoughnessMaterial original) : base(original)
 {
     customType  = original.customType;
     baseColor   = original.baseColor;
     baseTexture = original.baseTexture;
     metallic    = original.metallic;
     roughness   = original.roughness;
     metallicRoughnessTexture = original.metallicRoughnessTexture;
     maxSimultaneousLights    = original.maxSimultaneousLights;
     disableLighting          = original.disableLighting;
     invertNormalMapX         = original.invertNormalMapX;
     invertNormalMapY         = original.invertNormalMapY;
     normalTexture            = original.normalTexture;
     emissive          = original.emissive;
     emissiveTexture   = original.emissiveTexture;
     occlusionStrength = original.occlusionStrength;
     occlusionTexture  = original.occlusionTexture;
     alphaCutOff       = original.alphaCutOff;
     transparencyMode  = original.transparencyMode;
     doubleSided       = original.doubleSided;
 }
Пример #4
0
 public BabylonPBRMetallicRoughnessMaterial(BabylonPBRMetallicRoughnessMaterial original) : base(original)
 {
     metallic  = original.metallic;
     roughness = original.roughness;
     metallicRoughnessTexture = original.metallicRoughnessTexture;
 }