예제 #1
0
        private static void AddUvBytes(AdvancedRenderCommonValues advanceValue, AdvancedRenderCommonValues2 advanceValue2,
                                       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, advanceValue2.BlendTextureParams.BlendTextureParam));

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

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

            // blend uv distortion intensity
            data.Add(advanceValue2.BlendTextureParams.BlendUVDistortionTextureParam.UVDistortionIntensity.GetBytes());
        }
 public TextureValuesAggregator(
     Data.RendererCommonValues value,
     AdvancedRenderCommonValues advanceValue,
     AdvancedRenderCommonValues2 advanceValue2,
     TextureInformationRepository repo)
 {
     _value             = value;
     _advanceValue      = advanceValue;
     _advanceValue2     = advanceValue2;
     _texInfo           = repo.Texture;
     _alpha             = repo.Alpha;
     _uvDistortion      = repo.UvDistortion;
     _blend             = repo.Blend;
     _blendAlpha        = repo.BlendAlpha;
     _blendUvDistortion = repo.BlendUvDistortion;
 }
예제 #3
0
        private static IEnumerable <byte[]> GetTextureValues(
            Data.RendererCommonValues value,
            AdvancedRenderCommonValues advanceValue,
            AdvancedRenderCommonValues2 advanceValue2,
            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, advanceValue2, texInfoRepo);

            MaterialSerializerInstance.AddMaterialData(version, value, aggregator,
                                                       texture_and_index, distortionTexture_and_index, normalTexture_and_index, material_and_index);
            return(aggregator.CurrentData);
        }