public EPropElevationManager(CommonExecutorUTProxy commonExecutor, UnityThreadComputeShaderExecutorObject shaderExecutorObject, EPropElevationConfiguration configuration, EPropConstantPyramidParameters constantPyramidParameters) { _configuration = configuration; _localeBufferManager = new EPropLocaleBufferManager(commonExecutor, shaderExecutorObject, configuration, constantPyramidParameters); _pointersOccupancyContainer = new EPropElevationLocalePointersOccupancyContainer(configuration); }
private TerrainDetailGenerator CreateTerrainDetailGenerator( Texture mainTexture, UTTextureRendererProxy utTextureRendererProxy, CommonExecutorUTProxy commonExecutorUtProxy, UnityThreadComputeShaderExecutorObject computeShaderExecutorObject, ComputeShaderContainerGameObject containerGameObject) { var featureAppliers = new List <RankedTerrainFeatureApplier>(); if (_configuration.EngraveTerrainFeatures) { featureAppliers.AddRange(FinalTerrainFeatureAppliers.CreateFeatureAppliers( utTextureRendererProxy, containerGameObject, commonExecutorUtProxy, computeShaderExecutorObject )); } if (_configuration.EngraveRoadsInTerrain) { featureAppliers.Add(FinalTerrainFeatureAppliers.CreateRoadEngravingApplier(CreateRoadEngravingFeatureApplier())); } TerrainDetailGeneratorConfiguration generatorConfiguration = _configuration.TerrainDetailGeneratorConfiguration; 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, commonExecutorUtProxy); return(generator); }
public Grass2BakingBillboardClanGenerator( ComputeShaderContainerGameObject computeShaderContainer, UnityThreadComputeShaderExecutorObject shaderExecutorObject) { _computeShaderContainer = computeShaderContainer; _shaderExecutorObject = shaderExecutorObject; }
public static TerrainDetailGenerator CreateTerrainDetailGenerator( Texture mainTexture, UTTextureRendererProxy utTextureRendererProxy, CommonExecutorUTProxy commonExecutorUtProxy, UnityThreadComputeShaderExecutorObject computeShaderExecutorObject, ComputeShaderContainerGameObject containerGameObject) { var featureAppliers = TerrainDetailProviderDebugUtils.CreateFeatureAppliers(utTextureRendererProxy, containerGameObject, commonExecutorUtProxy, computeShaderExecutorObject); 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, commonExecutorUtProxy); return(generator); }
public WeldingExecutor(ComputeShaderContainerGameObject computeShaderContainer, UnityThreadComputeShaderExecutorObject shaderExecutorObject, Texture weldTexture) { _computeShaderContainer = computeShaderContainer; _shaderExecutorObject = shaderExecutorObject; _weldTexture = weldTexture; }
public HydraulicErosionTerrainFeatureApplier(ComputeShaderContainerGameObject computeShaderContainer, UnityThreadComputeShaderExecutorObject shaderExecutorObject, Dictionary <TerrainCardinalResolution, HydraulicEroderConfiguration> configurations) { _computeShaderContainer = computeShaderContainer; _shaderExecutorObject = shaderExecutorObject; _configurations = configurations; }
public void Start() { TaskUtils.SetGlobalMultithreading(false); _unityThreadComputeShaderExecutorObject = new UnityThreadComputeShaderExecutorObject(); _generator = new SolidTextureGeneratorUsingComputeShader("npr_solidTexture_noise_comp", _unityThreadComputeShaderExecutorObject); StartCoroutine(GenerateSolidTexture()); }
public void Start(ComputeShaderContainerGameObject computeShaderContainer) { var commonExecutor = new CommonExecutorUTProxy(); var shaderExecutorObject = new UnityThreadComputeShaderExecutorObject(); var updater = new DesignBodySpotUpdater(new DesignBodySpotChangeCalculator(computeShaderContainer, shaderExecutorObject, commonExecutor, HeightDenormalizer.Identity)); _designBodySpotUpdaterProxy = new DesignBodySpotUpdaterProxy(updater); updater.SetChangesListener(new LambdaSpotPositionChangesListener(null, dict => { foreach (var pair in dict) { _grassGroupsPlanter.GrassGroupSpotChanged(pair.Key, pair.Value); } })); _designBodySpotUpdaterProxy.StartThreading(() => { }); var meshGenerator = new GrassMeshGenerator(); var mesh = meshGenerator.GetGrassBladeMesh(1); var instancingMaterial = new Material(Shader.Find("Custom/Vegetation/Grass.Instanced")); instancingMaterial.enableInstancing = true; var commonUniforms = new UniformsPack(); commonUniforms.SetUniform("_BendingStrength", 0.0f); commonUniforms.SetUniform("_WindDirection", Vector4.one); var instancingContainer = new GpuInstancingVegetationSubjectContainer( new GpuInstancerCommonData(mesh, instancingMaterial, commonUniforms), new GpuInstancingUniformsArrayTemplate(new List <GpuInstancingUniformTemplate>() { new GpuInstancingUniformTemplate("_Color", GpuInstancingUniformType.Vector4), new GpuInstancingUniformTemplate("_InitialBendingValue", GpuInstancingUniformType.Float), new GpuInstancingUniformTemplate("_PlantBendingStiffness", GpuInstancingUniformType.Float), new GpuInstancingUniformTemplate("_PlantDirection", GpuInstancingUniformType.Vector4), new GpuInstancingUniformTemplate("_RandSeed", GpuInstancingUniformType.Float), }) ); _globalGpuInstancingContainer = new GlobalGpuInstancingContainer(); var bucketId = _globalGpuInstancingContainer.CreateBucket(instancingContainer); GrassGroupsContainer grassGroupsContainer = new GrassGroupsContainer(_globalGpuInstancingContainer, bucketId); IGrassPositionResolver grassPositionResolver = new SimpleRandomSamplerPositionResolver(); GrassDetailInstancer grassDetailInstancer = new GrassDetailInstancer(); _grassGroupsPlanter = new GrassGroupsPlanter( grassDetailInstancer, grassPositionResolver, grassGroupsContainer, _designBodySpotUpdaterProxy, new LegacyGrass2BladeAspectsGenerator(), GrassDebugUtils.TemplatesDictionary, Repositioner.Identity); }
public ThermalErosionTerrainFeatureApplier(ComputeShaderContainerGameObject computeShaderContainer, UnityThreadComputeShaderExecutorObject shaderExecutorObject, CommonExecutorUTProxy commonExecutor, Dictionary <TerrainCardinalResolution, ThermalErosionTerrainFeatureApplierConfiguration> configurations) { _computeShaderContainer = computeShaderContainer; _shaderExecutorObject = shaderExecutorObject; _commonExecutor = commonExecutor; _configurations = configurations; }
public void Compute() { CommonExecutorUTProxy commonExecutor = new CommonExecutorUTProxy(); HabitatMapDbProxy habitatMapDbProxy = _gameInitializationFields.Retrive <HabitatMapDbProxy>(); ComputeShaderContainerGameObject computeShaderContainer = _gameInitializationFields.Retrive <ComputeShaderContainerGameObject>(); UnityThreadComputeShaderExecutorObject shaderExecutorObject = _gameInitializationFields.Retrive <UnityThreadComputeShaderExecutorObject>(); var templatesDict = _vegetationConfiguration.FloraDomainCreationTemplates; var floraConfiguration = _vegetationConfiguration.FloraConfiguration; var spatialDbConfiguration = _vegetationConfiguration.FloraDomainSpatialDbConfiguration; var dbsDict = new Dictionary <HabitatAndZoneType, ISpatialDb <FloraDomainIntensityArea> >(); foreach (var pair in templatesDict) { IStoredPartsGenerator <FloraDomainIntensityArea> partsGenerator = new FloraDomainIntensityGenerator(pair.Value, computeShaderContainer, shaderExecutorObject, commonExecutor, 1f, floraConfiguration); var spatialDb = new CacheingSpatialDb <FloraDomainIntensityArea>( new SpatialDb <FloraDomainIntensityArea>(partsGenerator, spatialDbConfiguration), spatialDbConfiguration); dbsDict[pair.Key] = spatialDb; } var floraDomainDb = new FloraDomainDbProxy(dbsDict); var biomeProvidersGenerators = _vegetationConfiguration.BiomeConfigurationsDict(floraDomainDb) .ToDictionary(c => c.Key, c => new BiomeProvidersFromHabitatGenerator(habitatMapDbProxy, c.Value)); var genralPlacer = new GeneralMultiDistrictPlacer( _vegetationConfiguration.GeneralMultiDistrictPlacerConfiguration, _gameInitializationFields.Retrive <TerrainShapeDbProxy>(), commonExecutor, biomeProvidersGenerators); var database = genralPlacer.Generate( _vegetationConfiguration.GenerationArea, _vegetationConfiguration.RankDependentSpeciesCharacteristics(), _vegetationConfiguration.GenerationCenter); var vegetationOnRoadRemover = new VegetationOnRoadRemover( _gameInitializationFields.Retrive <RoadDatabaseProxy>(), _vegetationConfiguration.VegetationOnRoadRemoverConfiguration ); var newDb = vegetationOnRoadRemover.RemoveCollidingTrees(database, _vegetationConfiguration.GenerationArea); //CreateDebugObjects(newDb.Subjects.ToDictionary(c => c.Key, c => c.Value.QueryAll())); VegetationDatabaseFileUtils.WriteToFileNonOverwrite( _pathsConfiguration.LoadingVegetationDatabaseDictionaryPath, newDb); }
public EPropLocaleBufferManager(CommonExecutorUTProxy commonExecutor, UnityThreadComputeShaderExecutorObject shaderExecutorObject, EPropElevationConfiguration configuration , EPropConstantPyramidParameters constantPyramidParameters) { _shaderExecutorObject = shaderExecutorObject; _configuration = configuration; _commonExecutor = commonExecutor; _constantPyramidParameters = constantPyramidParameters; _scopes = new EPropLocaleBufferScopeRegistry[configuration.MaxScopesCount]; }
public HabitatToGrassIntensityMapGenerator(ComputeShaderContainerGameObject computeShaderContainer, UnityThreadComputeShaderExecutorObject shaderExecutorObject, CommonExecutorUTProxy commonExecutor, HabitatToGrassIntensityMapGeneratorConfiguration configuration) { _computeShaderContainer = computeShaderContainer; _shaderExecutorObject = shaderExecutorObject; _configuration = configuration; _commonExecutor = commonExecutor; }
public TerrainShapeDbUnderTest(bool useTextureSavingToDisk = false, bool useCornerMerging = false, string terrainDetailFilePath = "C:\\unityCache\\", bool useTextureLoadingFromDisk = false) { CommonExecutorUTProxy commonExecutorUtProxy = new CommonExecutorUTProxy(); ComputeShaderContainerGameObject containerGameObject = GameObject.FindObjectOfType <ComputeShaderContainerGameObject>(); var globalHeightTexture = CreateGlobalHeightTexture(commonExecutorUtProxy); UTTextureRendererProxy textureRendererProxy = new UTTextureRendererProxy(new TextureRendererService( new MultistepTextureRenderer(containerGameObject), new TextureRendererServiceConfiguration() { StepSize = new Vector2(400, 400) })); UnityThreadComputeShaderExecutorObject computeShaderExecutorObject = new UnityThreadComputeShaderExecutorObject(); var terrainDetailGenerator = Ring1DebugObjectV2.CreateTerrainDetailGenerator( globalHeightTexture, textureRendererProxy, commonExecutorUtProxy, computeShaderExecutorObject, containerGameObject); TerrainDetailCornerMerger merger = null; LateAssignFactory <BaseTerrainDetailProvider> detailProviderFactory = new LateAssignFactory <BaseTerrainDetailProvider>(); if (useCornerMerging) { merger = new TerrainDetailCornerMerger(detailProviderFactory, new TerrainDetailAlignmentCalculator(240), textureRendererProxy, new TextureConcieverUTProxy(), new CommonExecutorUTProxy(), new TerrainDetailCornerMergerConfiguration()); } var terrainDetailProvider = Ring1DebugObjectV2.CreateTerrainDetailProvider(terrainDetailGenerator, merger); _shapeDb = FETerrainShapeDbInitialization.CreateTerrainShapeDb(terrainDetailProvider, commonExecutorUtProxy , new TerrainDetailAlignmentCalculator(240), useCornerMerging, useTextureSavingToDisk, useTextureLoadingFromDisk , new TerrainDetailFileManager(terrainDetailFilePath, commonExecutorUtProxy)); var baseProvider = new FromTerrainDbBaseTerrainDetailProvider(_shapeDb); detailProviderFactory.Assign(baseProvider); terrainDetailGenerator.SetBaseTerrainDetailProvider(baseProvider); }
// Use this for initialization void Start() { _updatableContainer = new UpdatableContainer(); TaskUtils.SetGlobalMultithreading(false); _ring1Tree = new Ring1Tree(); ////////////////// var rgbaMainTexture = SavingFileManager.LoadPngTextureFromFile(@"C:\inz\cont\n49_e019_1arc_v3.png", 3600, 3600, TextureFormat.ARGB32, true, false); CommonExecutorUTProxy commonExecutorUtProxy = new CommonExecutorUTProxy(); //todo _updatableContainer.AddUpdatableElement(commonExecutorUtProxy); TerrainTextureFormatTransformator transformator = new TerrainTextureFormatTransformator(commonExecutorUtProxy); var globalHeightTexture = transformator.EncodedHeightTextureToPlain(new TextureWithSize() { Size = new IntVector2(3600, 3600), Texture = rgbaMainTexture }); /// /// VISIBILITY TEXTURE var visibilityTextureSideLength = 16; var visibilityTexture = new Texture2D(visibilityTextureSideLength, visibilityTextureSideLength, TextureFormat.RFloat, false); visibilityTexture.filterMode = FilterMode.Point; var visibilityTextureProcessorProxy = new Ring1VisibilityTextureProcessorUTProxy(new Ring1VisibilityTextureProcessor(visibilityTexture)); _updatableContainer.AddUpdatableElement(visibilityTextureProcessorProxy); var visibilityTextureChangeGrabber = new Ring1VisibilityTextureChangeGrabber(); var terrainParentGameObject = new GameObject("TerrainParent"); var unityCoordsCalculator = new UnityCoordsCalculator(new Vector2(24 * 240 * 2, 24 * 240 * 2)); var orderGrabber = new Ring1PaintingOrderGrabber(); var painterProxy = new RingTerrainPainterUTProxy(new RingTerrainPainter()); _updatableContainer.AddUpdatableElement(painterProxy); painterProxy.Update(); var mainRespondingProxy = new Ring1NodeEventMainRespondingProxy(new Ring1NodeEventMainResponder()); _otherThreadActionPairs.Add(new OtherThreadProxyAndActionPair() { Proxy = mainRespondingProxy, EveryPostAction = () => { var delta = visibilityTextureChangeGrabber.RetriveVisibilityChanges(); if (delta.AnyChange) { var visibilityTextureChagnes = visibilityTextureChangeGrabber.RetriveVisibilityChanges(); visibilityTextureProcessorProxy.AddOrder(visibilityTextureChagnes); } if (orderGrabber.IsAnyOrder) { painterProxy.AddOrder(orderGrabber.RetriveOrderAndClear()); } } }); UTTextureRendererProxy textureRendererProxy = new UTTextureRendererProxy(new TextureRendererService( new MultistepTextureRenderer(ContainerGameObject), new TextureRendererServiceConfiguration() { StepSize = new Vector2(500, 500) })); _updatableContainer.AddUpdatableElement(textureRendererProxy); UnityThreadComputeShaderExecutorObject computeShaderExecutorObject = new UnityThreadComputeShaderExecutorObject(); _updatableContainer.AddUpdatableElement(computeShaderExecutorObject); _updatableContainer.AddUpdatableElement(commonExecutorUtProxy); TerrainDetailGenerator terrainDetailGenerator = CreateTerrainDetailGenerator( globalHeightTexture, textureRendererProxy, commonExecutorUtProxy, computeShaderExecutorObject, ContainerGameObject); TerrainDetailProvider terrainDetailProvider = CreateTerrainDetailProvider(terrainDetailGenerator); var terrainShapeDb = FETerrainShapeDbInitialization.CreateTerrainShapeDb(terrainDetailProvider, commonExecutorUtProxy , new TerrainDetailAlignmentCalculator(240), false, false, false, null); TerrainShapeDbProxy terrainShapeDbProxy = new TerrainShapeDbProxy(terrainShapeDb); terrainDetailGenerator.SetBaseTerrainDetailProvider(BaseTerrainDetailProvider.CreateFrom(terrainShapeDb)); _otherThreadActionPairs.Add(new OtherThreadProxyAndActionPair() { Proxy = terrainShapeDbProxy }); var meshGeneratorProxy = new MeshGeneratorUTProxy(new MeshGeneratorService()); _updatableContainer.AddUpdatableElement(meshGeneratorProxy); _stainTerrainResourceCreatorUtProxy = new StainTerrainResourceCreatorUTProxy(new StainTerrainResourceCreator()); _updatableContainer.AddUpdatableElement(_stainTerrainResourceCreatorUtProxy); var stainTerrainServiceProxy = new StainTerrainServiceProxy( new StainTerrainService( new ComputationStainTerrainResourceGenerator( new StainTerrainResourceComposer( _stainTerrainResourceCreatorUtProxy ), new StainTerrainArrayMelder(), new DummyStainTerrainArrayFromBiomesGenerator( new DebugBiomeContainerGenerator().GenerateBiomesContainer( new BiomesContainerConfiguration()), new StainTerrainArrayFromBiomesGeneratorConfiguration() )), new MyRectangle(0, 0, 24 * 240 * 2, 24 * 240 * 2))); _otherThreadActionPairs.Add(new OtherThreadProxyAndActionPair() { Proxy = stainTerrainServiceProxy }); var gRing1NodeTerrainCreator = new GRing1NodeTerrainCreator( orderGrabber, terrainParentGameObject, meshGeneratorProxy, terrainShapeDbProxy, stainTerrainServiceProxy, unityCoordsCalculator, null, null, new GRingGroundShapeProviderConfiguration(), new GRingTerrainMeshProviderConfiguration()); var gRing2NodeTerrainCreator = new GRing2NodeTerrainCreator( orderGrabber, terrainParentGameObject, meshGeneratorProxy, terrainShapeDbProxy, unityCoordsCalculator, new GRing2PatchesCreatorProxy(CreateRing2PatchesCreator()), null, null, new GRingGroundShapeProviderConfiguration(), new GRingTerrainMeshProviderConfiguration()); UTRing2PlateStamperProxy stamperProxy = new UTRing2PlateStamperProxy( new Ring2PlateStamper(new Ring2PlateStamperConfiguration() { PlateStampPixelsPerUnit = new Dictionary <int, float>() }, ContainerGameObject)); _updatableContainer.AddUpdatableElement(stamperProxy); Ring2PatchStamplingOverseerFinalizer patchStamper = new Ring2PatchStamplingOverseerFinalizer(stamperProxy, textureRendererProxy, commonExecutorUtProxy); var gStampedRing2NodeTerrainCreator = new GStampedRing2NodeTerrainCreator( orderGrabber, terrainParentGameObject, meshGeneratorProxy, terrainShapeDbProxy, unityCoordsCalculator, new GRing2PatchesCreatorProxy(CreateRing2PatchesCreator()), patchStamper, null, null, new GRingGroundShapeProviderConfiguration(), new GRingTerrainMeshProviderConfiguration()); var subCreator = new SupremeGRingNodeTerrainCreator(new List <NewListenersCreatorWithLimitation>() { //new NewListenersCreatorWithMaximumLod() //{ // Creator = gRing1NodeTerrainCreator, // MaximumLod = new FlatLod(6) //}, new NewListenersCreatorWithLimitation() { Creator = new GVoidNodeTerrainCreator(), MaximumLod = new FlatLod(6) }, //new NewListenersCreatorWithMaximumLod() //{ // Creator = gRing2NodeTerrainCreator, // MaximumLod = new FlatLod(8) //} new NewListenersCreatorWithLimitation() { Creator = gStampedRing2NodeTerrainCreator, MaximumLod = new FlatLod(9) } }); var eventCollector = new Ring1NodeEventCollector( new DynamicFlatLodGRingNodeTerrainCreator(subCreator, new FlatLodCalculator(unityCoordsCalculator))); _ring1TreeProxy = new Ring1TreeProxy(_ring1Tree); _otherThreadActionPairs.Add(new OtherThreadProxyAndActionPair() { Proxy = _ring1TreeProxy, EveryPostAction = () => { if (eventCollector.Any) { mainRespondingProxy.AddOrder(eventCollector.RetriveOrderAndClear()); } } }); var baseQuadSideLength = 90f; StartThreading(_otherThreadActionPairs); _ring1TreeProxy.CreateHeightmap(new Ring1Tree.RootNodeCreationParameters() { UnityCoordsCalculator = unityCoordsCalculator, NodeListener = eventCollector, PrecisionDistances = new Dictionary <float, int> { //{4f * 50f/3f, 9}, //{4f * 50f/2f, 8}, { CalculatePrecisionDistance(baseQuadSideLength, 2, 1), 7 }, { 6.5f * 50f, 6 }, { 20 * 50f, 5 }, { 40 * 50f, 4 }, { 50 * 50f, 3 }, { 100 * 50f, 2 }, { 200 * 50f, 1 } }, InitialCameraPosition = Vector3.zero, }); }
public RenderCubeToTexture3DTransformer(UnityThreadComputeShaderExecutorObject shaderExecutorObject) { _shaderExecutorObject = shaderExecutorObject; }
public EdgeAngleAssetGenerator(UnityThreadComputeShaderExecutorObject shaderExecutorObject) { _shaderExecutorObject = shaderExecutorObject; }
public void Start() { UnityEngine.Random.InitState(412); TaskUtils.SetGlobalMultithreading(false); UnityThreadComputeShaderExecutorObject shaderExecutorObject = new UnityThreadComputeShaderExecutorObject(); ComputeShaderContainerGameObject containerGameObject = GameObject.FindObjectOfType <ComputeShaderContainerGameObject>(); UTTextureRendererProxy textureRendererProxy = new UTTextureRendererProxy(new TextureRendererService( new MultistepTextureRenderer(containerGameObject), new TextureRendererServiceConfiguration() { StepSize = new Vector2(400, 400) })); var meshGeneratorUtProxy = new MeshGeneratorUTProxy(new MeshGeneratorService()); var startConfiguration = ETerrainHeightPyramidFacadeStartConfiguration.DefaultConfiguration; ETerrainHeightBuffersManager buffersManager = new ETerrainHeightBuffersManager(); _eTerrainHeightPyramidFacade = new ETerrainHeightPyramidFacade(buffersManager, meshGeneratorUtProxy, textureRendererProxy, startConfiguration); var perLevelTemplates = _eTerrainHeightPyramidFacade.GenerateLevelTemplates(); var levels = startConfiguration.PerLevelConfigurations.Keys; var ePyramidShaderBuffersGeneratorPerRingInputs = levels.ToDictionary(c => c, c => new EPyramidShaderBuffersGeneratorPerRingInput() { FloorTextureResolution = startConfiguration.CommonConfiguration.FloorTextureSize.X, //TODO i use only X, - works only for squares HeightMergeRanges = perLevelTemplates[c].PerRingTemplates.ToDictionary(k => k.Key, k => k.Value.HeightMergeRange), CeilSliceWorldSize = startConfiguration.PerLevelConfigurations[c].FloorTextureWorldSize.x, // TODO works only for square pyramids - i use width RingUvRanges = startConfiguration.CommonConfiguration.RingsUvRange }); buffersManager.InitializeBuffers(ePyramidShaderBuffersGeneratorPerRingInputs, startConfiguration.CommonConfiguration.MaxLevelsCount, startConfiguration.CommonConfiguration.MaxRingsPerLevelCount); _eTerrainHeightPyramidFacade.Start(perLevelTemplates, new Dictionary <EGroundTextureType, OneGroundTypeLevelTextureEntitiesGenerator>() { //{ // EGroundTextureType.HeightMap, new OneGroundTypeLevelTextureEntitiesGenerator() // { // SegmentFillingListenerGeneratorFunc = (level) => // { // var floorTexture = // EGroundTextureGenerator.GenerateEmptyGroundTexture(startConfiguration.CommonConfiguration.FloorTextureSize, // startConfiguration.CommonConfiguration.HeightTextureFormat); // var segmentsPlacer = new ESurfaceSegmentPlacer(textureRendererProxy, floorTexture // , startConfiguration.CommonConfiguration.SlotMapSize, startConfiguration.CommonConfiguration.FloorTextureSize); // var pyramidLevelManager = new GroundLevelTexturesManager(startConfiguration.CommonConfiguration.SlotMapSize); // var segmentModificationManager = new SoleLevelGroundTextureSegmentModificationsManager(segmentsPlacer, pyramidLevelManager); // return new SegmentFillingListenerWithFloorTexture() // { // FloorTexture = floorTexture, // SegmentFillingListener = new LambdaSegmentFillingListener( // (c) => // { // var segmentTexture = ETerrainIntegrationMultipleSegmentsDEO.CreateDummySegmentTexture(c, level); // segmentModificationManager.AddSegmentAsync(segmentTexture, c.SegmentAlignedPosition); // }, // (c) => { }, // (c) => { } // ) // }; // }, // } //} } ); //_eTerrainHeightPyramidFacade.DisableShapes(); _eTerrainHeightPyramidFacade.DisableLevelShapes(HeightPyramidLevel.Bottom); Traveller.transform.position = new Vector3(startConfiguration.InitialTravellerPosition.x, 0, startConfiguration.InitialTravellerPosition.y); var ePropLocationConfiguration = new EPropElevationConfiguration(); EPropConstantPyramidParameters ePropConstantPyramidParameters = new EPropConstantPyramidParameters() { LevelsCount = startConfiguration.HeightPyramidLevels.Count, RingsPerLevelCount = startConfiguration.CommonConfiguration.MaxRingsPerLevelCount, //TODO parametrize HeightScale = startConfiguration.CommonConfiguration.YScale }; _elevationManager = new EPropElevationManager(new CommonExecutorUTProxy(), shaderExecutorObject, ePropLocationConfiguration, ePropConstantPyramidParameters); var heightFloorTextureArray = _eTerrainHeightPyramidFacade.FloorTextureArrays.Where(c => c.TextureType == EGroundTextureType.HeightMap).Select(c => c.Texture).First(); var initializedBuffers = _elevationManager.Initialize(buffersManager.PyramidPerFrameParametersBuffer, buffersManager.EPyramidConfigurationBuffer, heightFloorTextureArray); var ePropLocaleBuffer = initializedBuffers.EPropLocaleBuffer; var ePropIdsBuffer = initializedBuffers.EPropIdsBuffer; _dummyObjectsDisplayer = new EPropDummyObjectsDisplayer(ePropLocationConfiguration.ScopeLength, ePropLocaleBuffer, ePropIdsBuffer, FindObjectOfType <BufferReloaderRootGO>()); _dummyObjectsDisplayer.Start(); _dummyObjectsInstancingDisplayer = new EPropDummyObjectsInstancingDisplayer(DebugMesh, DebugMeshMaterial); _dummyObjectsInstancingDisplayer.Start(); _dummyObjectsInstancingDisplayer.SetLocaleBuffers(ePropLocaleBuffer, ePropIdsBuffer, ePropLocationConfiguration.ScopeLength); _sectorAreasDisplayer = new EPropDebugSectorAreasDisplayer(); _sectorAreasDisplayer.Start(); _mergeRingsDisplayer = new EPropDebugMergeRingsDisplayer(); _mergeRingsDisplayer.Start(); var levelWorldSizes = startConfiguration.PerLevelConfigurations.ToDictionary(c => c.Key, c => c.Value.FloorTextureWorldSize); var ringMergeRanges = perLevelTemplates.ToDictionary(c => c.Key, c => c.Value.PerRingTemplates.ToDictionary(k => k.Key, k => k.Value.HeightMergeRange)); _ePropHotAreaSelector = new EPropHotAreaSelector(levelWorldSizes, ringMergeRanges); _elevationManager.DebugInitializeSectors(new MyRectangle(-200, -200, 400, 400)); }
public void Start(ComputeShaderContainerGameObject computeShaderContainer) { var commonExecutor = new CommonExecutorUTProxy(); var shaderExecutorObject = new UnityThreadComputeShaderExecutorObject(); var updater = new DesignBodySpotUpdater(new DesignBodySpotChangeCalculator(computeShaderContainer, shaderExecutorObject, commonExecutor, HeightDenormalizer.Identity)); _designBodySpotUpdaterProxy = new DesignBodySpotUpdaterProxy(updater); updater.SetChangesListener(new LambdaSpotPositionChangesListener(null, dict => { foreach (var pair in dict) { _grassGroupsPlanter.GrassGroupSpotChanged(pair.Key, pair.Value); } })); _designBodySpotUpdaterProxy.StartThreading(() => { }); var meshGenerator = new GrassMeshGenerator(); var mesh = meshGenerator.GetGrassBillboardMesh(0, 1); var instancingMaterial = new Material(Shader.Find("Custom/Vegetation/GrassBushBillboard.Instanced")); instancingMaterial.enableInstancing = true; /// CLAN var billboardsFileManger = new Grass2BillboardClanFilesManager(); var clan = billboardsFileManger.Load(@"C:\inz\billboards\", new IntVector2(256, 256)); var singleToDuo = new Grass2BakingBillboardClanGenerator(computeShaderContainer, shaderExecutorObject); var bakedClan = singleToDuo.GenerateBakedAsync(clan).Result; /// var commonUniforms = new UniformsPack(); commonUniforms.SetUniform("_BendingStrength", 0.0f); commonUniforms.SetUniform("_WindDirection", Vector4.one); commonUniforms.SetTexture("_DetailTex", bakedClan.DetailTextureArray); commonUniforms.SetTexture("_BladeSeedTex", bakedClan.BladeSeedTextureArray); var instancingContainer = new GpuInstancingVegetationSubjectContainer( new GpuInstancerCommonData(mesh, instancingMaterial, commonUniforms), new GpuInstancingUniformsArrayTemplate(new List <GpuInstancingUniformTemplate>() { new GpuInstancingUniformTemplate("_Color", GpuInstancingUniformType.Vector4), new GpuInstancingUniformTemplate("_InitialBendingValue", GpuInstancingUniformType.Float), new GpuInstancingUniformTemplate("_PlantBendingStiffness", GpuInstancingUniformType.Float), new GpuInstancingUniformTemplate("_PlantDirection", GpuInstancingUniformType.Vector4), new GpuInstancingUniformTemplate("_RandSeed", GpuInstancingUniformType.Float), new GpuInstancingUniformTemplate("_ArrayTextureIndex", GpuInstancingUniformType.Float), }) ); _globalGpuInstancingContainer = new GlobalGpuInstancingContainer(); var bucketId = _globalGpuInstancingContainer.CreateBucket(instancingContainer); GrassGroupsContainer grassGroupsContainer = new GrassGroupsContainer(_globalGpuInstancingContainer, bucketId); IGrassPositionResolver grassPositionResolver = new PoissonDiskSamplerPositionResolver(new MyRange(1.5f * 0.4f * 10, 10 * 2 * 1.3f)); //IGrassPositionResolver grassPositionResolver = new SimpleRandomSamplerPositionResolver(); GrassDetailInstancer grassDetailInstancer = new GrassDetailInstancer(); _grassGroupsPlanter = new GrassGroupsPlanter( grassDetailInstancer, grassPositionResolver, grassGroupsContainer, _designBodySpotUpdaterProxy, new Grass2BushAspectsGenerator(bakedClan), //todo! GrassDebugUtils.BushTemplates, Repositioner.Identity); }
public UniqueVertexArrayBufferGenerator(String shaderName, UnityThreadComputeShaderExecutorObject shaderExecutorObject) { _shaderName = shaderName; _shaderExecutorObject = shaderExecutorObject; }
public static List <RankedTerrainFeatureApplier> CreateFeatureAppliers( UTTextureRendererProxy utTextureRendererProxy, ComputeShaderContainerGameObject computeShaderContainerGameObject, CommonExecutorUTProxy commonExecutor, UnityThreadComputeShaderExecutorObject threadComputeShaderExecutorObject, Func <RoadEngravingTerrainFeatureApplier> roadApplierCreatingFunc = null) { var toReturn = new List <RankedTerrainFeatureApplier>() { new RankedTerrainFeatureApplier() { Rank = 1, Applier = new RandomNoiseTerrainFeatureApplier(utTextureRendererProxy, commonExecutor, new Dictionary <TerrainCardinalResolution, RandomNoiseTerrainFeatureApplierConfiguration> { { TerrainCardinalResolution.MIN_RESOLUTION, new RandomNoiseTerrainFeatureApplierConfiguration() { DetailResolutionMultiplier = 1, NoiseStrengthMultiplier = 1 } }, { TerrainCardinalResolution.MID_RESOLUTION, new RandomNoiseTerrainFeatureApplierConfiguration() { DetailResolutionMultiplier = 8, NoiseStrengthMultiplier = 0.45f } }, { TerrainCardinalResolution.MAX_RESOLUTION, new RandomNoiseTerrainFeatureApplierConfiguration() { DetailResolutionMultiplier = 8 * 8, NoiseStrengthMultiplier = 4.7f * 0.45f / 9f //todo CHANGE IT !! } }, }), AvalibleResolutions = new List <TerrainCardinalResolution>() { TerrainCardinalResolution.MIN_RESOLUTION, TerrainCardinalResolution.MID_RESOLUTION, TerrainCardinalResolution.MAX_RESOLUTION, } }, new RankedTerrainFeatureApplier() { Rank = 2, Applier = new DiamondSquareTerrainFeatureApplier( new RandomProviderGenerator(123), commonExecutor, utTextureRendererProxy, new Dictionary <TerrainCardinalResolution, DiamondSquareTerrainFeatureApplierConfiguration> { { TerrainCardinalResolution.MIN_RESOLUTION, new DiamondSquareTerrainFeatureApplierConfiguration { DiamondSquareWorkingArrayLength = 32, DiamondSquareWeight = 0.012f } }, { TerrainCardinalResolution.MID_RESOLUTION, new DiamondSquareTerrainFeatureApplierConfiguration { DiamondSquareWorkingArrayLength = 32, DiamondSquareWeight = 0.0025f * 1.3f } }, { TerrainCardinalResolution.MAX_RESOLUTION, new DiamondSquareTerrainFeatureApplierConfiguration { DiamondSquareWorkingArrayLength = 32, DiamondSquareWeight = 0.0003f } }, }), AvalibleResolutions = new List <TerrainCardinalResolution>() { TerrainCardinalResolution.MIN_RESOLUTION, TerrainCardinalResolution.MID_RESOLUTION, TerrainCardinalResolution.MAX_RESOLUTION, } }, new RankedTerrainFeatureApplier() { Rank = 3, Applier = new ThermalErosionTerrainFeatureApplier(computeShaderContainerGameObject, threadComputeShaderExecutorObject, commonExecutor, new Dictionary <TerrainCardinalResolution, ThermalErosionTerrainFeatureApplierConfiguration> { { TerrainCardinalResolution.MIN_RESOLUTION, new ThermalErosionTerrainFeatureApplierConfiguration { } }, { TerrainCardinalResolution.MID_RESOLUTION, new ThermalErosionTerrainFeatureApplierConfiguration { TParam = 0.001f / 2.3f, CParam = 0.06f } }, }), AvalibleResolutions = new List <TerrainCardinalResolution>() { TerrainCardinalResolution.MIN_RESOLUTION, TerrainCardinalResolution.MID_RESOLUTION } }, new RankedTerrainFeatureApplier() { Rank = 4, Applier = new HydraulicErosionTerrainFeatureApplier(computeShaderContainerGameObject, threadComputeShaderExecutorObject, new Dictionary <TerrainCardinalResolution, HydraulicEroderConfiguration>() { { TerrainCardinalResolution.MIN_RESOLUTION, new HydraulicEroderConfiguration() { StepCount = 20, kr_ConstantWaterAddition = 0.000002f, // 0.0001f, ks_GroundToSedimentFactor = 1f, ke_WaterEvaporationFactor = 0.05f, kc_MaxSedimentationFactor = 0.8f, } }, { TerrainCardinalResolution.MID_RESOLUTION, new HydraulicEroderConfiguration() { StepCount = 20, kr_ConstantWaterAddition = 0.000002f, // 0.0001f, ks_GroundToSedimentFactor = 1f, ke_WaterEvaporationFactor = 0.05f, kc_MaxSedimentationFactor = 0.8f / 2f, } }, { TerrainCardinalResolution.MAX_RESOLUTION, new HydraulicEroderConfiguration() { StepCount = 20, kr_ConstantWaterAddition = 0.0000035f, // 0.0001f, ks_GroundToSedimentFactor = 1f, ke_WaterEvaporationFactor = 0.05f, kc_MaxSedimentationFactor = 0.8f / 4f, } } }), AvalibleResolutions = new List <TerrainCardinalResolution>() { TerrainCardinalResolution.MIN_RESOLUTION, TerrainCardinalResolution.MID_RESOLUTION, TerrainCardinalResolution.MAX_RESOLUTION, } }, new RankedTerrainFeatureApplier() { Rank = 5, Applier = new TweakedThermalErosionTerrainFeatureApplier(computeShaderContainerGameObject, threadComputeShaderExecutorObject, new Dictionary <TerrainCardinalResolution, TweakedThermalErosionTerrainFeatureApplierConfiguration> { { TerrainCardinalResolution.MIN_RESOLUTION, new TweakedThermalErosionTerrainFeatureApplierConfiguration() { } }, { TerrainCardinalResolution.MID_RESOLUTION, new TweakedThermalErosionTerrainFeatureApplierConfiguration() { TParam = 0.001f, CParam = 0.008f } }, { TerrainCardinalResolution.MAX_RESOLUTION, new TweakedThermalErosionTerrainFeatureApplierConfiguration() { TParam = 0.001f, CParam = 0.008f } }, }), AvalibleResolutions = new List <TerrainCardinalResolution>() { TerrainCardinalResolution.MIN_RESOLUTION, TerrainCardinalResolution.MID_RESOLUTION, TerrainCardinalResolution.MAX_RESOLUTION, } }, }; if (roadApplierCreatingFunc != null) { var roadApplier = roadApplierCreatingFunc(); toReturn.Add(new RankedTerrainFeatureApplier() { Applier = roadApplier, AvalibleResolutions = new List <TerrainCardinalResolution>() { TerrainCardinalResolution.MAX_RESOLUTION }, Rank = 10 }); } return(toReturn); }
public BufferGeneratorUsingComputeShader(String shaderName, UnityThreadComputeShaderExecutorObject shaderExecutorObject) { _shaderName = shaderName; _shaderExecutorObject = shaderExecutorObject; }
public BarycentricCoordinatesBufferGenerator(String shaderName, UnityThreadComputeShaderExecutorObject shaderExecutorObject) { _shaderName = shaderName; _shaderExecutorObject = shaderExecutorObject; }
public void Start() { TaskUtils.SetGlobalMultithreading(true); _computeShaderExecutorObject = new UnityThreadComputeShaderExecutorObject(); _commonExecutorUtProxy = new CommonExecutorUTProxy(); _utTextureRendererProxy = new UTTextureRendererProxy(new TextureRendererService( new MultistepTextureRenderer(ContainerGameObject), new TextureRendererServiceConfiguration() { StepSize = new Vector2(500, 500) })); var rgbaMainTexture = SavingFileManager.LoadPngTextureFromFile(@"C:\inz\cont\n49_e019_1arc_v3.png", 3600, 3600, TextureFormat.ARGB32, true, false); TerrainTextureFormatTransformator transformator = new TerrainTextureFormatTransformator(_commonExecutorUtProxy); transformator.EncodedHeightTextureToPlainAsync(new TextureWithSize() { Size = new IntVector2(3600, 3600), Texture = rgbaMainTexture }).ContinueWith(x => { var mainTexture = x.Result; TerrainDetailGenerator generator = CreateTerrainDetailGenerator(new TextureWithSize() { Size = new IntVector2(3600, 3600), Texture = mainTexture }); TerrainDetailProvider terrainDetailProvider = CreateTerrainDetailProvider(generator); var db = FETerrainShapeDbInitialization.CreateTerrainShapeDb(terrainDetailProvider, _commonExecutorUtProxy, new TerrainDetailAlignmentCalculator(240), false, false, false, null); MyRectangle queryArea = null; if (_terrainResolution == TerrainCardinalResolution.MIN_RESOLUTION) { queryArea = new MyRectangle(0, 0, 24 * 240, 24 * 240); } else if (_terrainResolution == TerrainCardinalResolution.MID_RESOLUTION) { queryArea = new MyRectangle(3 * 240, 3 * 240, 3 * 240, 3 * 240); } else { queryArea = new MyRectangle(5 * 0.375f * 240, 5 * 0.375f * 240, 0.375f * 240, 0.375f * 240); } var outputOfGeneration = db.QueryAsync(new TerrainDescriptionQuery() { QueryArea = queryArea, RequestedElementDetails = new List <TerrainDescriptionQueryElementDetail>() { new TerrainDescriptionQueryElementDetail() { Resolution = _terrainResolution.LowerResolution, Type = TerrainDescriptionElementTypeEnum.HEIGHT_ARRAY }, new TerrainDescriptionQueryElementDetail() { Resolution = _terrainResolution, Type = TerrainDescriptionElementTypeEnum.NORMAL_ARRAY }, } }); outputOfGeneration.ContinueWith(c => { GeneratedTerrainElements elem = new GeneratedTerrainElements(); elem.HeightElement = c.Result.GetElementOfType(TerrainDescriptionElementTypeEnum.HEIGHT_ARRAY); elem.NormalElement = c.Result.GetElementOfType(TerrainDescriptionElementTypeEnum.NORMAL_ARRAY); _generatedElements.Add(elem); }).ContinueWith(q => { Debug.Log("Error: Executing task"); Debug.Log("Error descr is " + q.Exception); }, TaskContinuationOptions.OnlyOnFaulted ); }); }
public MeiErosionTerrainFeatureApplier(ComputeShaderContainerGameObject computeShaderContainer, UnityThreadComputeShaderExecutorObject shaderExecutorObject) { _computeShaderContainer = computeShaderContainer; _shaderExecutorObject = shaderExecutorObject; }
public SolidTextureGeneratorUsingComputeShader(string shaderName, UnityThreadComputeShaderExecutorObject shaderExecutorObject) { _shaderName = shaderName; _shaderExecutorObject = shaderExecutorObject; }
public void Start() { _unityThreadComputeShaderExecutorObject = new UnityThreadComputeShaderExecutorObject(); var globalHeightTexture = SavingFileManager.LoadPngTextureFromFile(@"C:\inz\cont\n49_e019_1arc_v3.png", 3600, 3600, TextureFormat.ARGB32, true, false); var sizedGlobalHeightTexture = new TextureWithSize() { Size = new IntVector2(3600, 3600), Texture = globalHeightTexture }; TaskUtils.SetGlobalMultithreading(true); _executionThreadProxy = new GenericAsyncExecutionThreadProxy("TerrainProviding"); _executionThreadProxy.StartThreading(() => { }); _executionThreadProxy.PostAction(async() => { InitializeFields(); //var tex0 = await CreateGenerateAndGenerateTexture(new List<RankedTerrainFeatureApplier>() //{ // new RankedTerrainFeatureApplier() // { // Rank = 1, // Applier = new RandomNoiseTerrainFeatureApplier(_utTextureRendererProxy, _commonExecutor, // new Dictionary<TerrainCardinalResolution, RandomNoiseTerrainFeatureApplierConfiguration> // { // { TerrainCardinalResolution.LOW_RESOLUTION, new RandomNoiseTerrainFeatureApplierConfiguration() { DetailResolutionMultiplier = 1} }, // { TerrainCardinalResolution.MID_RESOLUTION, new RandomNoiseTerrainFeatureApplierConfiguration() {DetailResolutionMultiplier = 8}}, // }), // AvalibleResolutions = new List<TerrainCardinalResolution>() // { // TerrainCardinalResolution.LOW_RESOLUTION, // TerrainCardinalResolution.MID_RESOLUTION, // TerrainCardinalResolution.MAX_RESOLUTION // } // }, // new RankedTerrainFeatureApplier() // { // Rank = 2, // Applier = new DiamondSquareTerrainFeatureApplier( // new DiamondSquareCreator(_randomProvider), _commonExecutor, // _utTextureRendererProxy), // AvalibleResolutions = new List<TerrainCardinalResolution>() // { // TerrainCardinalResolution.LOW_RESOLUTION, // TerrainCardinalResolution.MID_RESOLUTION, // TerrainCardinalResolution.MAX_RESOLUTION // } // }, // new RankedTerrainFeatureApplier() // { // Rank = 3, // Applier = new ThermalErosionTerrainFeatureApplier(ContainerGameObject, // _unityThreadComputeShaderExecutorObject, _commonExecutor), // AvalibleResolutions = new List<TerrainCardinalResolution>() // { // TerrainCardinalResolution.LOW_RESOLUTION, // TerrainCardinalResolution.MID_RESOLUTION, // TerrainCardinalResolution.MAX_RESOLUTION // } // }, // new RankedTerrainFeatureApplier() // { // Rank = 4, // Applier = new HydraulicErosionTerrainFeatureApplier(ContainerGameObject,_unityThreadComputeShaderExecutorObject), // AvalibleResolutions = new List<TerrainCardinalResolution>() // { // TerrainCardinalResolution.LOW_RESOLUTION, // TerrainCardinalResolution.MID_RESOLUTION, // TerrainCardinalResolution.MAX_RESOLUTION // } // }, // //new RankedTerrainFeatureApplier() // //{ // // Rank = 6, // // Applier = new TweakedThermalErosionTerrainFeatureApplier(ContainerGameObject, _unityThreadComputeShaderExecutorObject), // // AvalibleResolutions = new List<TerrainCardinalResolution>() // // { // // TerrainCardinalResolution.LOW_RESOLUTION, // // TerrainCardinalResolution.MID_RESOLUTION, // // TerrainCardinalResolution.MAX_RESOLUTION // // } // //} //}, sizedGlobalHeightTexture); //var tex1 = await CreateGenerateAndGenerateTexture(new List<RankedTerrainFeatureApplier>() //{ // new RankedTerrainFeatureApplier() // { // Rank = 1, // Applier = new RandomNoiseTerrainFeatureApplier(_utTextureRendererProxy, _commonExecutor, // new Dictionary<TerrainCardinalResolution, RandomNoiseTerrainFeatureApplierConfiguration> // { // { TerrainCardinalResolution.LOW_RESOLUTION, new RandomNoiseTerrainFeatureApplierConfiguration() { DetailResolutionMultiplier = 1} }, // { TerrainCardinalResolution.MID_RESOLUTION, new RandomNoiseTerrainFeatureApplierConfiguration() {DetailResolutionMultiplier = 8}}, // }), // AvalibleResolutions = new List<TerrainCardinalResolution>() // { // TerrainCardinalResolution.LOW_RESOLUTION, // TerrainCardinalResolution.MID_RESOLUTION, // TerrainCardinalResolution.MAX_RESOLUTION // } // }, // new RankedTerrainFeatureApplier() // { // Rank = 2, // Applier = new DiamondSquareTerrainFeatureApplier( // new DiamondSquareCreator(_randomProvider), _commonExecutor, // _utTextureRendererProxy), // AvalibleResolutions = new List<TerrainCardinalResolution>() // { // TerrainCardinalResolution.LOW_RESOLUTION, // TerrainCardinalResolution.MID_RESOLUTION, // TerrainCardinalResolution.MAX_RESOLUTION // } // }, // new RankedTerrainFeatureApplier() // { // Rank = 3, // Applier = new ThermalErosionTerrainFeatureApplier(ContainerGameObject, // _unityThreadComputeShaderExecutorObject, _commonExecutor), // AvalibleResolutions = new List<TerrainCardinalResolution>() // { // TerrainCardinalResolution.LOW_RESOLUTION, // TerrainCardinalResolution.MID_RESOLUTION, // TerrainCardinalResolution.MAX_RESOLUTION // } // }, // new RankedTerrainFeatureApplier() // { // Rank = 6, // Applier = new HydraulicErosionTerrainFeatureApplier(ContainerGameObject,_unityThreadComputeShaderExecutorObject), // AvalibleResolutions = new List<TerrainCardinalResolution>() // { // TerrainCardinalResolution.LOW_RESOLUTION, // TerrainCardinalResolution.MID_RESOLUTION, // TerrainCardinalResolution.MAX_RESOLUTION // } // }, // //new RankedTerrainFeatureApplier() // //{ // // Rank = 5, // // Applier = new TweakedThermalErosionTerrainFeatureApplier(ContainerGameObject, _unityThreadComputeShaderExecutorObject), // // AvalibleResolutions = new List<TerrainCardinalResolution>() // // { // // TerrainCardinalResolution.MID_RESOLUTION, // // TerrainCardinalResolution.MAX_RESOLUTION // // } // //} //}, sizedGlobalHeightTexture); //_resultBag.Add(new MyTexturePair() //{ // Tex0 = tex0, // Tex1 = tex1 //}); }); }