Example #1
0
        public void Render(ScriptableRenderContext context, Camera camera, bool useDynamicBatching, bool useGPUInstancing, ShadowSettings shadowSettings)
        {
            this.context = context;
            this.camera  = camera;
            PrepareBuffer();
            PrepareForSceneWindow();
            if (!Cull(shadowSettings.maxDistance))
            {
                return;
            }

            buffer.BeginSample(SampleName);
            ExecuteBuffer();
            lighting.SetUp(context, cullingResults, shadowSettings);
            buffer.EndSample(SampleName);
            Setup();
            DrawVisibleGeometry(useDynamicBatching, useGPUInstancing);
            DrawUnsupportedShaders();
            DrawGizmos();
            lighting.Cleanup();
            Submit();
        }
Example #2
0
 public void SetUp(ScriptableRenderContext context, CullingResults cullingResults, ShadowSettings shadowSettings)
 {
     buffer.BeginSample(bufferName);
     shadows.SetUp(context, cullingResults, shadowSettings);
     SetupLight(cullingResults);
     shadows.Render();
     buffer.EndSample(bufferName);
     context.ExecuteCommandBuffer(buffer);
     buffer.Clear();
 }
Example #3
0
        public void SetUp(ScriptableRenderContext context, CullingResults cullingResults, ShadowSettings shadowSettings)
        {
            this.context        = context;
            this.cullingResults = cullingResults;
            this.settings       = shadowSettings;

            shadowedDirectionalLightCount = 0;
        }
 public CustomRenderPipeline(bool useDynamicBatching, bool useGPUInstancing, bool useSRPBatcher, ShadowSettings shadowSettings)
 {
     this.useDynamicBatching = useDynamicBatching;
     this.useGPUInstancing   = useGPUInstancing;
     this._shadowSettings    = shadowSettings;
     GraphicsSettings.useScriptableRenderPipelineBatching = useSRPBatcher;
     GraphicsSettings.lightsUseLinearIntensity            = true;
 }