示例#1
0
 public void RenderShadow(RenderTarget rt)
 {
     foreach (var key in dicRenderer.Keys)
     {
         ClusterRendering shadow = dicRenderer[key];
         shadow.Render(rt);
     }
 }
示例#2
0
    public void Render(RenderTarget rt)
    {
        frustumCulling.Render(rt);
        matManager.Render(rt);

        foreach (var key in dicRenderer.Keys)
        {
            ClusterRendering rendering = dicRenderer[key];
            rendering.Render(rt);
        }
    }
示例#3
0
    private void InitData(ScriptableRenderContext context)
    {
        bInit = true;

        data         = new PipelineCommandData();
        data.command = new CommandBuffer();
        data.asset   = asset;
        data.context = context;

        rendering = GameObject.FindGameObjectWithTag("GameController").GetComponent <ClusterRendering>();
    }
示例#4
0
    public void UnloadScene(Dictionary <string, ClusterRendering> dic, string name)
    {
        if (!dic.ContainsKey(name))
        {
            return;
        }
        matManager.Clear();

        ClusterRendering rendering = dic[name];

        rendering.Dispose();
        dic.Remove(name);
    }
示例#5
0
    public void LoadScene(string name, SceneMode mode = SceneMode.Only)
    {
        if (mode == SceneMode.Only)
        {
            UnloadAll();
        }

        int clusterCount = asset.res.GetClusterCount(name);

        frustumCulling.LoadScene(name, clusterCount);
        matManager.LoadScene(name);

        ClusterRendering renderer = new ClusterRendering();

        renderer.Init(asset);
        renderer.LoadScene(name, clusterCount);
        dicRenderer.Add(name, renderer);
    }