示例#1
0
        static void FillVoxelMaterialEntry(ref MyVoxelMaterialEntry entry, ref MyVoxelMaterial1 voxelMaterial1)
        {
            entry.DistancesAndScale     = voxelMaterial1.DistanceAndScale;
            entry.DistancesAndScaleFar  = new Vector3(voxelMaterial1.DistanceAndScaleFar.X, voxelMaterial1.DistanceAndScaleFar.Y, 1);
            entry.DistancesAndScaleFar2 = new Vector3(voxelMaterial1.DistanceAndScaleFar.Z, voxelMaterial1.DistanceAndScaleFar.W, 2);
            entry.DistancesAndScaleFar3 = new Vector3(voxelMaterial1.DistanceAndScaleFar3.X, voxelMaterial1.DistanceAndScaleFar3.Y, 3);
            entry.Far3Color             = voxelMaterial1.Far3Color;
            entry.ExtensionDetailScale  = voxelMaterial1.ExtensionDetailScale;

            IDynamicFileArrayTexture texColorMetal  = MyGlobalResources.FileArrayTextureVoxelCM;
            IDynamicFileArrayTexture texNormalGloss = MyGlobalResources.FileArrayTextureVoxelNG;
            IDynamicFileArrayTexture texExt         = MyGlobalResources.FileArrayTextureVoxelExt;

            MyVoxelMaterialDetailSet set = voxelMaterial1.Resource;

            UpdateVoxelSlices(ref entry, texColorMetal, set.ColorMetalXZnY_Filepaths, set.ColorMetalY_Filepaths,
                              texNormalGloss, set.NormalGlossXZnY_Filepaths, set.NormalGlossY_Filepaths,
                              texExt, set.ExtY_Filepaths, set.ExtY_Filepaths);
        }
示例#2
0
        static void FillVoxelMaterialEntry(ref MyVoxelMaterialEntry entry, ref MyVoxelMaterial1 voxelMaterial1)
        {
            entry.DistancesAndScale = voxelMaterial1.DistanceAndScale;
            entry.DistancesAndScaleFar = new Vector3(voxelMaterial1.DistanceAndScaleFar.X, voxelMaterial1.DistanceAndScaleFar.Y, 1);
            entry.DistancesAndScaleFar2 = new Vector3(voxelMaterial1.DistanceAndScaleFar.Z, voxelMaterial1.DistanceAndScaleFar.W, 2);
            entry.DistancesAndScaleFar3 = new Vector3(voxelMaterial1.DistanceAndScaleFar3.X, voxelMaterial1.DistanceAndScaleFar3.Y, 3);
            entry.Far3Color = voxelMaterial1.Far3Color;
            entry.ExtensionDetailScale = voxelMaterial1.ExtensionDetailScale;

            IDynamicFileArrayTexture texColorMetal = MyGlobalResources.FileArrayTextureVoxelCM;
            IDynamicFileArrayTexture texNormalGloss = MyGlobalResources.FileArrayTextureVoxelNG;
            IDynamicFileArrayTexture texExt = MyGlobalResources.FileArrayTextureVoxelExt;

            MyVoxelMaterialDetailSet set = voxelMaterial1.Resource;
            UpdateVoxelSlices(ref entry, texColorMetal, set.ColorMetalXZnY_Filepaths, set.ColorMetalY_Filepaths,
                texNormalGloss, set.NormalGlossXZnY_Filepaths, set.NormalGlossY_Filepaths,
                texExt, set.ExtY_Filepaths, set.ExtY_Filepaths);
        }