示例#1
0
    void LateUpdate()
    {
        if (isValid() == false)
        {
            return;
        }

        renderPatchesBuffer = null;

        float startTime = Time.time;

        quadTree.Process(out renderPatchesBuffer);

        Setting.matTerrain.SetFloat(Shader.PropertyToID("offsetLOD"), Setting.QuadTree.OffsetLOD);

        Debug.LogFormat("四元樹處理時間 : {0} ms", Time.time - startTime);

        perlin.Apply(Setting.matTerrain);

        if (GpuDrivenRenderPassFeature.Instance != null)
        {
            GpuDrivenRenderPassFeature.Instance.RegisterTerrain(this);
        }
    }