public Grass2BillboardClanGenerator(Grass2BillboardGenerator billboardGenerator,
                                     Grass2BillboardClanGeneratorConfiguration configuration = null)
 {
     _billboardGenerator = billboardGenerator;
     if (configuration == null)
     {
         configuration = new Grass2BillboardClanGeneratorConfiguration();
     }
     _configuration = configuration;
 }
Exemplo n.º 2
0
        public void Start()
        {
            TaskUtils.SetGlobalMultithreading(false);
            var generator = new Grass2BillboardGenerator(new UTTextureRendererProxy(new TextureRendererService(
                                                                                        new MultistepTextureRenderer(ComputeShaderContainer), new TextureRendererServiceConfiguration()
            {
                StepSize = new Vector2(10, 10)
            })), new Grass2BillboardGenerator.Grass2BillboardGeneratorConfiguration()
            {
                BillboardSize = new IntVector2(256, 256)
            });

            //var tex = generator.GenerateBillboardImageAsync(50, 12.3f).Result;
            //TextureShowingObject.GetComponent<MeshRenderer>().material.SetTexture("_MainTex", tex);

            var clansGenerator = new Grass2BillboardClanGenerator(generator);
            var clan           = clansGenerator.Generate();

            var fileManager = new Grass2BillboardClanFilesManager();

            fileManager.Save(@"C:\inz\billboards\", clan);
        }