Esempio n. 1
0
 /// <inheritdoc/>
 protected override Layer GetEmissionLayer()
 {
     return(new Layer
     {
         image = MagickImageUtility.GetMagickImage(Material.GetTexture("_Emissive_Tex")),
         color = Material.GetColor("_Emissive_Color"),
     });
 }
Esempio n. 2
0
 /// <summary>
 /// Generate and save MSMap.
 /// </summary>
 /// <param name="destPath">File path to save.</param>
 internal void GenerateMetallicSmoothness(string destPath)
 {
     using (var metallic = metallicMap ? MagickImageUtility.GetMagickImage(metallicMap) : new MagickImage(MagickColors.White, 2, 2))
         using (var smoothness = smoothnessMap ? MagickImageUtility.GetMagickImage(smoothnessMap) : new MagickImage(MagickColors.White, 2, 2))
             using (var msMap = MagickImageUtility.GenerateMetallicSmoothness(metallic, false, smoothness, invertSmoothness && smoothnessMap))
             {
                 MagickImageUtility.SaveAsAsset(destPath, msMap, MagickFormat.Png32, false);
             }
 }
Esempio n. 3
0
 private Layer GetMainLayer()
 {
     return(new Layer
     {
         // mainTexture may return null in some cases (e.g. After upgrading lilToon)
         image = MagickImageUtility.GetMagickImage(Material.mainTexture ?? Material.GetTexture("_MainTex")),
         color = Material.HasProperty("_Color") ? Material.color : Color.white,
     });
 }
Esempio n. 4
0
        private Layer GetEmissiveFreakLayer(int index)
        {
            var num = index + 1;

            return(new Layer
            {
                image = MagickImageUtility.GetMagickImage(Material.GetTexture($"_EmissiveFreak{num}Tex")),
                color = Material.GetColor($"_EmissiveFreak{num}Color"),
            });
        }
Esempio n. 5
0
        /// <summary>
        /// Return emission layer.
        /// </summary>
        /// <returns>Emission layer.</returns>
        protected virtual Layer GetEmissionLayer()
        {
            if (!HasEmission())
            {
                return(null);
            }

            return(new Layer
            {
                image = MagickImageUtility.GetMagickImage(Material.GetTexture("_EmissionMap")),
                color = Material.GetColor("_EmissionColor"),
            });
        }