/// <inheritdoc/> public override void Execute(ScriptableRenderer renderer, ScriptableRenderContext context, ref RenderingData renderingData) { if (renderer == null) { throw new ArgumentNullException("renderer"); } CommandBuffer cmd = CommandBufferPool.Get(k_RenderTransparentsTag); using (new ProfilingSample(cmd, k_RenderTransparentsTag)) { RenderBufferLoadAction loadOp = RenderBufferLoadAction.Load; RenderBufferStoreAction storeOp = RenderBufferStoreAction.Store; SetRenderTarget(cmd, colorAttachmentHandle.Identifier(), loadOp, storeOp, depthAttachmentHandle.Identifier(), loadOp, storeOp, ClearFlag.None, Color.black, descriptor.dimension); context.ExecuteCommandBuffer(cmd); cmd.Clear(); Camera camera = renderingData.cameraData.camera; var drawSettings = CreateDrawRendererSettings(camera, SortFlags.CommonTransparent, rendererConfiguration, renderingData.supportsDynamicBatching); context.DrawRenderers(renderingData.cullResults.visibleRenderers, ref drawSettings, m_TransparentFilterSettings); // Render objects that did not match any shader pass with error shader renderer.RenderObjectsWithError(context, ref renderingData.cullResults, camera, m_TransparentFilterSettings, SortFlags.None); } context.ExecuteCommandBuffer(cmd); CommandBufferPool.Release(cmd); }