public static void RenderSingleCamera(ScriptableRenderContext context, Camera camera, ref CullResults cullResults, IRendererSetup setup, ScriptableRenderer renderer) { CommandBuffer cmd = commandBufferPool.Get("RenderSingleCam"); CameraData cameraData; InitializeCameraData(camera, out cameraData); ScriptableCullingParameters cullingParam; if (!CullResults.GetCullingParameters(camera, false, out cullingParam)) { commandBufferPool.Release(cmd); return; } cullingParam.shadowDistance = Mathf.Min(ShadowDistance, camera.farClipPlane); context.ExecuteCommandBuffer(cmd); cmd.Clear(); #if UNITY_EDITOR //SceneView Camera #endif CullResults.Cull(ref cullingParam, context, ref cullResults); RenderingData renderingData; InitializeRenderingData(ref cameraData, ref cullResults, out renderingData); IRendererSetup setupToUse = setup; if (setupToUse == null) { setupToUse = defaultRenderSetup; } renderer.Clear(); setupToUse.Setup(renderer, ref renderingData); renderer.Execute(context, ref renderingData); context.ExecuteCommandBuffer(cmd); commandBufferPool.Release(cmd); context.Submit(); }