示例#1
0
    public void SetUp(ScriptableRenderContext ctx, CullingResults cullingResults, ShadowSettings shadowSettings)
    {
        this.cullingResults = cullingResults;

        buffer.BeginSample(BufferName);

        // SetUpDirectionalLights() is obsolete since it only supports 1 light
        // SetUpDirectionalLights();

        // Lighting sets up shadows
        shadows.SetUp(ctx, cullingResults, shadowSettings);

        // Set up all visible lights we want to support - for now only Directional ones :)
        SetUpLights();

        // Render the shadows
        shadows.Render();

        buffer.EndSample(BufferName);
        ctx.ExecuteCommandBuffer(buffer);
        buffer.Clear();
    }