public GCompositeRing2NodeTerrainCreator( Ring1PaintingOrderGrabber orderGrabber, GameObject parentObject, MeshGeneratorUTProxy meshGenerator, ITerrainShapeDb terrainShapeDb, UnityCoordsCalculator coordsCalculator, GRing2PatchesCreatorProxy patchesCreator, GRingSpotUpdater spotUpdater, HeightArrayWeldingPack weldingPack, Ring2PatchStamplingOverseerFinalizer patchStamper, GRingGroundShapeProviderConfiguration groundShapeProviderConfiguration, GRingTerrainMeshProviderConfiguration terrainMeshProviderConfiguration) { _orderGrabber = orderGrabber; _parentObject = parentObject; _meshGenerator = meshGenerator; _terrainShapeDb = terrainShapeDb; _coordsCalculator = coordsCalculator; _patchesCreator = patchesCreator; _spotUpdater = spotUpdater; _weldingPack = weldingPack; _patchStamper = patchStamper; _groundShapeProviderConfiguration = groundShapeProviderConfiguration; _terrainMeshProviderConfiguration = terrainMeshProviderConfiguration; }
public GRing2SurfaceProvider(GRing2PatchesCreatorProxy patchesCreator, MyRectangle inGamePosition, FlatLod flatLod) { _patchesCreator = patchesCreator; _inGamePosition = inGamePosition; _flatLod = flatLod; }
public void Start() { TaskUtils.SetGlobalMultithreading(false); var shaderContainerGO = FindObjectOfType <ComputeShaderContainerGameObject>(); var configuration = new FEConfiguration(new FilePathsConfiguration()); GlobalServicesProfileInfo servicesProfileInfo = new GlobalServicesProfileInfo(); var ultraUpdatableContainer = new UltraUpdatableContainer( configuration.SchedulerConfiguration, servicesProfileInfo, configuration.UpdatableContainerConfiguration); Dictionary <int, float> intensityPatternPixelsPerUnit = new Dictionary <int, float>() { { 1, 1 } }; int mipmapLevelToExtract = 2; Dictionary <int, float> plateStampPixelsPerUnit = new Dictionary <int, float>() { { 1, 5 } }; _updatableContainer = new UltraUpdatableContainer(new MyUtSchedulerConfiguration(), new GlobalServicesProfileInfo(), new UltraUpdatableContainerConfiguration()); _provider = ESurfaceProviderInitializationHelper.ConstructProvider( _updatableContainer, intensityPatternPixelsPerUnit, shaderContainerGO, mipmapLevelToExtract, plateStampPixelsPerUnit); _patchesCreatorProxy = new GRing2PatchesCreatorProxy(ESurfaceProviderInitializationHelper.CreateRing2PatchesCreator(_updatableContainer, intensityPatternPixelsPerUnit)); RegeneratePatch(); }
public GStampedRing2SurfaceProvider(GRing2PatchesCreatorProxy patchesCreator, MyRectangle inGamePosition, Ring2PatchStamplingOverseerFinalizer patchStamper, FlatLod flatLod) { _patchesCreator = patchesCreator; _inGamePosition = inGamePosition; _patchStamper = patchStamper; _flatLod = flatLod; }
public ESurfacePatchProvider(GRing2PatchesCreatorProxy patchesCreator, Ring2PatchStamplingOverseerFinalizer patchStamper, CommonExecutorUTProxy commonExecutor, MipmapExtractor mipmapExtractor, int mipmapLevelToExtract) { _patchesCreator = patchesCreator; _patchStamper = patchStamper; _commonExecutor = commonExecutor; _mipmapExtractor = mipmapExtractor; _mipmapLevelToExtract = mipmapLevelToExtract; }
public void Start() { var ring2ShaderRepository = Ring2PlateShaderRepository.Create(); var conciever = _gameInitializationFields.Retrive <TextureConcieverUTProxy>(); var detailEnhancer = new Ring2IntensityPatternEnhancer(_gameInitializationFields.Retrive <UTTextureRendererProxy>(), _ring2InitializerConfiguration.Ring2IntensityPatternEnhancingSizeMultiplier); var ring2PatchesPainterUtProxy = new Ring2PatchesPainterUTProxy(new Ring2PatchesPainter( new Ring2MultishaderMaterialRepository(ring2ShaderRepository, Ring2ShaderNames.ShaderNames))); _ultraUpdatableContainer.Add(ring2PatchesPainterUtProxy); var patchesCreator = new GRing2PatchesCreator( _gameInitializationFields.Retrive <IRing2RegionsDatabase>(), new GRing2RegionsToPatchTemplateConventer(), new Ring2PatchTemplateCombiner(), new Ring2PatchCreator(), new Ring2IntensityPatternProvider(conciever, detailEnhancer), new GRing2Deviser(), _ring2InitializerConfiguration.Ring2PatchesOverseerConfiguration ); var gRing2PatchesCreatorProxy = new GRing2PatchesCreatorProxy(patchesCreator); _ultraUpdatableContainer.AddOtherThreadProxy(gRing2PatchesCreatorProxy); _gameInitializationFields.SetField(gRing2PatchesCreatorProxy); UTRing2PlateStamperProxy stamperProxy = new UTRing2PlateStamperProxy( new Ring2PlateStamper(_ring2InitializerConfiguration.Ring2PlateStamperConfiguration, _gameInitializationFields.Retrive <ComputeShaderContainerGameObject>())); _ultraUpdatableContainer.Add(stamperProxy); Ring2PatchStamplingOverseerFinalizer patchStamper = new Ring2PatchStamplingOverseerFinalizer( stamperProxy, _gameInitializationFields.Retrive <UTTextureRendererProxy>(), _gameInitializationFields.Retrive <CommonExecutorUTProxy>()); _gameInitializationFields.SetField(patchStamper); }
public static ESurfacePatchProvider ConstructProvider(UltraUpdatableContainer updatableContainer, Dictionary <int, float> intensityPatternPixelsPerUnit, ComputeShaderContainerGameObject shaderContainerGO, int mipmapLevelToExtract, Dictionary <int, float> plateStampPixelsPerUnit) { var ring2ShaderRepository = Ring2PlateShaderRepository.Create(); TextureConcieverUTProxy conciever = new TextureConcieverUTProxy(); updatableContainer.Add(conciever); var ring2PatchesPainterUtProxy = new Ring2PatchesPainterUTProxy( new Ring2PatchesPainter( new Ring2MultishaderMaterialRepository(ring2ShaderRepository, Ring2ShaderNames.ShaderNames))); updatableContainer.Add(ring2PatchesPainterUtProxy); UTRing2PlateStamperProxy stamperProxy = new UTRing2PlateStamperProxy( new Ring2PlateStamper(new Ring2PlateStamperConfiguration() { PlateStampPixelsPerUnit = plateStampPixelsPerUnit }, shaderContainerGO)); updatableContainer.Add(stamperProxy); UTTextureRendererProxy textureRendererProxy = new UTTextureRendererProxy(new TextureRendererService( new MultistepTextureRenderer(shaderContainerGO), new TextureRendererServiceConfiguration() { StepSize = new Vector2(500, 500) })); updatableContainer.Add(textureRendererProxy); CommonExecutorUTProxy commonExecutorUtProxy = new CommonExecutorUTProxy(); //todo updatableContainer.Add(commonExecutorUtProxy); Ring2PatchStamplingOverseerFinalizer patchStamperOverseerFinalizer = new Ring2PatchStamplingOverseerFinalizer(stamperProxy, textureRendererProxy, commonExecutorUtProxy); MipmapExtractor mipmapExtractor = new MipmapExtractor(textureRendererProxy); var patchesCreatorProxy = new GRing2PatchesCreatorProxy(CreateRing2PatchesCreator(updatableContainer, intensityPatternPixelsPerUnit)); return(new ESurfacePatchProvider(patchesCreatorProxy, patchStamperOverseerFinalizer, commonExecutorUtProxy, mipmapExtractor, mipmapLevelToExtract)); }