Exemplo n.º 1
0
        public FPrecomputedVolumetricLightmapData(FArchive Ar)
        {
            Bounds = Ar.Read <FBox>();
            IndirectionTextureDimensions = Ar.Read <FIntVector>();
            IndirectionTexture           = new FVolumetricLightmapDataLayer(Ar);

            BrickSize           = Ar.Read <int>();
            BrickDataDimensions = Ar.Read <FIntVector>();

            BrickData = new FVolumetricLightmapBrickLayer
            {
                AmbientVector  = new FVolumetricLightmapDataLayer(Ar),
                SHCoefficients = new FVolumetricLightmapDataLayer[6]
            };

            for (var i = 0; i < BrickData.SHCoefficients.Length; i++)
            {
                BrickData.SHCoefficients[i] = new FVolumetricLightmapDataLayer(Ar);
            }

            BrickData.SkyBentNormal             = new FVolumetricLightmapDataLayer(Ar);
            BrickData.DirectionalLightShadowing = new FVolumetricLightmapDataLayer(Ar);

            if (FMobileObjectVersion.Get(Ar) >= FMobileObjectVersion.Type.LQVolumetricLightmapLayers)
            {
                BrickData.LQLightColor     = new FVolumetricLightmapDataLayer(Ar);
                BrickData.LQLightDirection = new FVolumetricLightmapDataLayer(Ar);
            }

            if (FRenderingObjectVersion.Get(Ar) >= FRenderingObjectVersion.Type.VolumetricLightmapStreaming)
            {
                SubLevelBrickPositions           = Ar.ReadArray <FIntVector>();
                IndirectionTextureOriginalValues = Ar.ReadArray <FColor>();
            }
        }
Exemplo n.º 2
0
        public FReflectionCaptureData(FAssetArchive Ar)
        {
            CubemapSize       = Ar.Read <int>();
            AverageBrightness = Ar.Read <float>();

            if (FRenderingObjectVersion.Get(Ar) >= FRenderingObjectVersion.Type.StoreReflectionCaptureBrightnessForCooking)
            {
                Brightness = Ar.Read <float>();
            }

            FullHDRCapturedData = Ar.ReadArray <byte>(); // Can also be stripped, but still a byte[]

            if (FMobileObjectVersion.Get(Ar) >= FMobileObjectVersion.Type.StoreReflectionCaptureCompressedMobile)
            {
                EncodedCaptureData = new FPackageIndex(Ar);
            }
            else
            {
                var _ = Ar.ReadArray <byte>();
            }
        }