Exemplo n.º 1
0
 public TerrainDetailGenerator(TerrainDetailGeneratorConfiguration configuration,
                               UTTextureRendererProxy rendererProxy, TextureWithCoords fullFundationTextureData,
                               List <RankedTerrainFeatureApplier> featureAppliers, CommonExecutorUTProxy commonExecutor)
 {
     _configuration            = configuration;
     _rendererProxy            = rendererProxy;
     _fullFundationTextureData = fullFundationTextureData;
     _featureAppliers          = featureAppliers;
     _commonExecutor           = commonExecutor;
 }
Exemplo n.º 2
0
        private TerrainDetailProvider CreateTerrainDetailProvider(List <RankedTerrainFeatureApplier> featureAppliers)
        {
            TerrainDetailGeneratorConfiguration generatorConfiguration = new TerrainDetailGeneratorConfiguration()
            {
                TerrainDetailImageSideDisjointResolution = 240
            };
            TextureWithCoords fullFundationData = new TextureWithCoords(new TextureWithSize()
            {
                Texture = MainTexture,
                Size    = new IntVector2(MainTexture.width, MainTexture.height)
            }, new MyRectangle(0, 0, 3601 * 24, 3601 * 24));

            TerrainDetailGenerator generator =
                new TerrainDetailGenerator(generatorConfiguration, _utTextureRendererProxy, fullFundationData,
                                           featureAppliers, new CommonExecutorUTProxy());

            var provider = new TerrainDetailProvider(generator, null, new TerrainDetailAlignmentCalculator(240));

            generator.SetBaseTerrainDetailProvider(BaseTerrainDetailProvider.CreateFrom(provider));
            return(provider);
        }
        public TerrainDetailGenerator CreateTerrainDetailGenerator(TextureWithSize mainTexture)
        {
            var featureAppliers =
                TerrainDetailProviderDebugUtils.CreateFeatureAppliers(_utTextureRendererProxy, ContainerGameObject,
                                                                      _commonExecutorUtProxy, _computeShaderExecutorObject);


            TerrainDetailGeneratorConfiguration generatorConfiguration = new TerrainDetailGeneratorConfiguration()
            {
                TerrainDetailImageSideDisjointResolution = 240
            };
            TextureWithCoords fullFundationData = new TextureWithCoords(new TextureWithSize()
            {
                Texture = mainTexture.Texture,
                Size    = new IntVector2(mainTexture.Size.X, mainTexture.Size.Y)
            }, new MyRectangle(0, 0, 3601 * 24, 3601 * 24));

            TerrainDetailGenerator generator =
                new TerrainDetailGenerator(generatorConfiguration, _utTextureRendererProxy, fullFundationData,
                                           featureAppliers, _commonExecutorUtProxy);

            return(generator);
        }