コード例 #1
0
    private void Awake()
    {
        Resolution.Bake();
        ThreadGroupSize.Bake();
        CellSize.Bake();

        MakeBuffer(ref dummyRenderCheckBuffer, 1, sizeof(int), renderCheckBufferData);
        MakeBuffer(ref dummyStepCheckBuffer, 1, sizeof(int), stepCheckBufferData);
        MakeTexture(ref workingTexture, Resolution);
        MakeTexture(ref displayTexture, Resolution);

        gameResolution = Resolution.Value / CellSize.Value;
        gameResolution.Bake();

        MakeTexture(ref workingGameTexture, gameResolution);
        MakeTexture(ref gameTexture, gameResolution);
        Display.texture = displayTexture;
    }