public void Read(AssetReader reader) { Resolution = reader.ReadSingle(); BakeResolution = reader.ReadSingle(); TextureWidth = reader.ReadInt32(); TextureHeight = reader.ReadInt32(); AO = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); AOMaxDistance = reader.ReadSingle(); CompAOExponent = reader.ReadSingle(); CompAOExponentDirect = reader.ReadSingle(); Padding = reader.ReadInt32(); LightmapParameters.Read(reader); LightmapsBakeMode = reader.ReadInt32(); TextureCompression = reader.ReadBoolean(); FinalGather = reader.ReadBoolean(); FinalGatherFiltering = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); FinalGatherRayCount = reader.ReadInt32(); ReflectionCompression = reader.ReadInt32(); MixedBakeMode = reader.ReadInt32(); BakeBackend = reader.ReadInt32(); PVRSampling = reader.ReadInt32(); PVRDirectSampleCount = reader.ReadInt32(); PVRSampleCount = reader.ReadInt32(); PVRBounces = reader.ReadInt32(); PVRFilterTypeDirect = reader.ReadInt32(); PVRFilterTypeIndirect = reader.ReadInt32(); PVRFilterTypeAO = reader.ReadInt32(); PVRFilteringMode = reader.ReadInt32(); PVRCulling = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); PVRFilteringGaussRadiusDirect = reader.ReadInt32(); PVRFilteringGaussRadiusIndirect = reader.ReadInt32(); PVRFilteringGaussRadiusAO = reader.ReadInt32(); PVRFilteringAtrousPositionSigmaDirect = reader.ReadSingle(); PVRFilteringAtrousPositionSigmaIndirect = reader.ReadSingle(); PVRFilteringAtrousPositionSigmaAO = reader.ReadSingle(); ShowResolutionOverlay = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); }
public void Read(AssetReader reader) { Resolution = reader.ReadSingle(); BakeResolution = reader.ReadSingle(); if (IsReadAtlasSize(reader.Version)) { int AtlasSize = reader.ReadInt32(); TextureWidth = TextureHeight = AtlasSize; } else { TextureWidth = reader.ReadInt32(); TextureHeight = reader.ReadInt32(); } AO = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); AOMaxDistance = reader.ReadSingle(); CompAOExponent = reader.ReadSingle(); CompAOExponentDirect = reader.ReadSingle(); if (IsReadExtractAmbientOcclusion(reader.Version)) { ExtractAmbientOcclusion = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); } Padding = reader.ReadInt32(); LightmapParameters.Read(reader); LightmapsBakeMode = (LightmapsMode)reader.ReadInt32(); TextureCompression = reader.ReadBoolean(); FinalGather = reader.ReadBoolean(); FinalGatherFiltering = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); FinalGatherRayCount = reader.ReadInt32(); ReflectionCompression = (ReflectionCubemapCompression)reader.ReadInt32(); MixedBakeMode = (MixedLightingMode)reader.ReadInt32(); BakeBackend = (Lightmapper)reader.ReadInt32(); PVRSampling = (Sampling)reader.ReadInt32(); PVRDirectSampleCount = reader.ReadInt32(); PVRSampleCount = reader.ReadInt32(); PVRBounces = reader.ReadInt32(); if (IsReadPVREnvironmentSampleCount(reader.Version)) { PVREnvironmentSampleCount = reader.ReadInt32(); PVREnvironmentReferencePointCount = reader.ReadInt32(); PVRFilteringMode = (FilterMode)reader.ReadInt32(); PVRDenoiserTypeDirect = (DenoiserType)reader.ReadInt32(); PVRDenoiserTypeIndirect = (DenoiserType)reader.ReadInt32(); PVRDenoiserTypeAO = (DenoiserType)reader.ReadInt32(); } PVRFilterTypeDirect = (FilterType)reader.ReadInt32(); PVRFilterTypeIndirect = (FilterType)reader.ReadInt32(); PVRFilterTypeAO = (FilterType)reader.ReadInt32(); if (IsReadPVREnvironmentMIS(reader.Version)) { PVREnvironmentMIS = reader.ReadInt32(); } if (!IsReadPVREnvironmentSampleCount(reader.Version)) { PVRFilteringMode = (FilterMode)reader.ReadInt32(); } PVRCulling = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); PVRFilteringGaussRadiusDirect = reader.ReadInt32(); PVRFilteringGaussRadiusIndirect = reader.ReadInt32(); PVRFilteringGaussRadiusAO = reader.ReadInt32(); PVRFilteringAtrousPositionSigmaDirect = reader.ReadSingle(); PVRFilteringAtrousPositionSigmaIndirect = reader.ReadSingle(); PVRFilteringAtrousPositionSigmaAO = reader.ReadSingle(); if (IsReadShowResolutionOverlay(reader.Version)) { ShowResolutionOverlay = reader.ReadBoolean(); } reader.AlignStream(AlignType.Align4); if (IsReadExportTrainingData(reader.Version)) { ExportTrainingData = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); } if (IsReadTrainingDataDestination(reader.Version)) { TrainingDataDestination = reader.ReadString(); } }