Пример #1
0
    public void Initialize()
    {
        // Initialize Buffers
        hairNodeCompute       = new HairNodeComute("hairNodesBuffer");
        circleColliderCompute = new circleColliderCompute("circleCollidersBuffer");

        textureCompute = new RenderTextureCompute("textureOut", new int3(1024, 1024, 32));

        // Initialize Shaders
        ComputeShader shader = Resources.Load <ComputeShader>("shader");

        computeGroupBase = new ComputeGroupBase(shader, "pixelCalc", new int3(32, 32, 1),
                                                new List <ComputeBase> {
            hairNodeCompute, circleColliderCompute, textureCompute
        });
    }
Пример #2
0
    public void Initialize()
    {
        // Initializes buffers
        areaRectCompute = new AreaRectCompute("rect");
        colorsCompute   = new ColorsCompute("colors");
        textureCompute  = new RenderTextureCompute("textureOut", new int3(1024, 1024, 32));

        // Initializes Shader.
        ComputeShader shader = Resources.Load <ComputeShader>("csFractal");

        computeGroupBase = new ComputeGroupBase(shader, "pixelCalc", new int3(32, 32, 1),
                                                new List <ComputeBase> {
            areaRectCompute, colorsCompute, textureCompute
        });

        UpdateViewEvent.Invoke(textureCompute.result);
    }