private static void AddUvBytes(AdvancedRenderCommonValues advanceValue,
                                       List <byte[]> data, TextureInformationRepository repo)
        {
            data.Add(GetUvBytes(repo.Alpha, advanceValue.AlphaTextureParam));
            data.Add(GetUvBytes(repo.UvDistortion, advanceValue.UVDistortionTextureParam));

            // uv distortion intensity
            data.Add(advanceValue.UVDistortionTextureParam.UVDistortionIntensity.GetBytes());

            data.Add(GetUvBytes(repo.Blend, advanceValue.BlendTextureParams.BlendTextureParam));

            // blend texture blend type
            if (advanceValue.BlendTextureParams.Enabled &&
                advanceValue.BlendTextureParams.BlendTextureParam.Texture.RelativePath != string.Empty)
            {
                data.Add(advanceValue.BlendTextureParams.BlendTextureParam.BlendType);
            }
            else
            {
                data.Add((-1).GetBytes());
            }

            data.Add(GetUvBytes(repo.BlendAlpha, advanceValue.BlendTextureParams.BlendAlphaTextureParam));
            data.Add(GetUvBytes(repo.BlendUvDistortion, advanceValue.BlendTextureParams.BlendUVDistortionTextureParam));

            // blend uv distortion intensity
            data.Add(advanceValue.BlendTextureParams.BlendUVDistortionTextureParam.UVDistortionIntensity.GetBytes());
        }
Exemple #2
0
 public TextureValuesAggregator(
     Data.RendererCommonValues value,
     AdvancedRenderCommonValues advanceValue,
     TextureInformationRepository repo)
 {
     _value             = value;
     _advanceValue      = advanceValue;
     _texInfo           = repo.Texture;
     _alpha             = repo.Alpha;
     _uvDistortion      = repo.UvDistortion;
     _blend             = repo.Blend;
     _blendAlpha        = repo.BlendAlpha;
     _blendUvDistortion = repo.BlendUvDistortion;
 }
Exemple #3
0
        private static IEnumerable <byte[]> GetTextureValues(
            Data.RendererCommonValues value,
            AdvancedRenderCommonValues advanceValue,
            SortedDictionary <string, int> texture_and_index,
            SortedDictionary <string, int> normalTexture_and_index,
            SortedDictionary <string, int> distortionTexture_and_index,
            SortedDictionary <string, int> material_and_index,
            ExporterVersion version,
            TextureInformationRepository texInfoRepo)
        {
            var aggregator = new TextureValuesAggregator(value, advanceValue, texInfoRepo);

            MaterialSerializerInstance.AddMaterialData(version, value, aggregator,
                                                       texture_and_index, distortionTexture_and_index, normalTexture_and_index, material_and_index);
            return(aggregator.CurrentData);
        }
 public TextureValuesAggregator(
     Data.RendererCommonValues value,
     AdvancedRenderCommonValues advanceValue,
     TextureInformationRepository repo,
     System.Func <string, string> convertLoadingFilePath)
 {
     _value                  = value;
     _advanceValue           = advanceValue;
     _texInfo                = repo.Texture;
     _alpha                  = repo.Alpha;
     _uvDistortion           = repo.UvDistortion;
     _blend                  = repo.Blend;
     _blendAlpha             = repo.BlendAlpha;
     _blendUvDistortion      = repo.BlendUvDistortion;
     _convertLoadingFilePath = convertLoadingFilePath;
 }