Exemplo n.º 1
0
 public void Setup(ScriptableRenderContext context, CullingResults cullingResults, ShadowSettings shadowSettings, float shadowTreshold)
 {
     this.cullingResults = cullingResults;
     this.shadowTreshold = shadowTreshold;
     buffer.BeginSample(bufferName);
     shadows.Setup(context, cullingResults, shadowSettings);
     SetupLights();
     shadows.Render();
     buffer.EndSample(bufferName);
     context.ExecuteCommandBuffer(buffer);
     buffer.Clear();
 }
Exemplo n.º 2
0
 public void Setup(ScriptableRenderContext context, CullingResults cullingResults, ShadowSettings shadowSettings)
 {
     this._cullingResults = cullingResults;
     buffer.BeginSample(bufferName);
     // SetupDirectionalLight();
     _shadows.Setup(context, cullingResults, shadowSettings);
     SetupLights();
     _shadows.Render();
     buffer.EndSample(bufferName);
     context.ExecuteCommandBuffer(buffer);
     buffer.Clear();
 }
Exemplo n.º 3
0
 public void Setup(ScriptableRenderContext context, CullingResults cullingResults, ShadowSettings shadowSettings, bool useLightsPerObject, int renderingLayerMask)
 {
     this.cullingResults = cullingResults;
     buffer.BeginSample(bufferName);
     shadows.Setup(context, cullingResults, shadowSettings);
     //SetupDirectionalLight();
     SetupLights(useLightsPerObject, renderingLayerMask);
     shadows.Render();
     buffer.EndSample(bufferName);
     context.ExecuteCommandBuffer(buffer);
     buffer.Clear();
 }
Exemplo n.º 4
0
    public void Setup(
        ScriptableRenderContext context,
        CullingResults cullingResults,
        ShadowSettings shadowSettings,
        bool useLightPerObject,
        int camRenderingLayerMask)
    {
        this.cullingResults = cullingResults;
        buffer.BeginSample(buffername);
        //Setup shadows before setup lights
        shadows.Setup(context, cullingResults, shadowSettings);
        //get all the Lightsinfo and sent to GPU
        SetupLights(useLightPerObject, camRenderingLayerMask);
        //render shadow
        shadows.Render();

        buffer.EndSample(buffername);
        context.ExecuteCommandBuffer(buffer);
        buffer.Clear();
    }
Exemplo n.º 5
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();
    }