定义自定义渲染管线使用的状态和绘制命令。
定义自定义 RenderPipeline 时,可使用 ScriptableRenderContext 向 GPU 调度和提交状态更新和绘制命令。
RenderPipeline.Render 方法实现通常会针对每个摄像机剔除渲染管线不需要渲染的对象(请参阅 CullingResults),然后对 ScriptableRenderContext.DrawRenderers 发起一系列调用并混合 ScriptableRenderContext.ExecuteCommandBuffer 调用。这些调用会设置全局着色器属性、更改渲染目标、分发计算着色器和其他渲染任务。若要实际执行渲染循环,请调用 ScriptableRenderContext.Submit。
另请参阅:RenderPipeline。
BeginRenderPass | 调度新渲染通道的开头。在任何时候只能有一个渲染通道处于活动状态。 |
BeginScopedRenderPass | 调度新渲染通道的开头。如果在 using 语句中调用此内容,则 Unity 会在退出 using 代码块时自动调用 EndRenderPass。在任何时候只能有一个渲染通道处于活动状态。 |
BeginScopedSubPass | 调度渲染通道中的新子通道的开头。如果在 using 语句调用此内容,则 Unity 会在退出 using 代码块时自动调用 EndSubPass。 渲染通道永远不能独立存在,必须始终包含至少一个子通道。在任何时候只能有一个子通道处于活动状态。 |
BeginSubPass | 调度渲染通道中的新子通道的开头。渲染通道永远不能独立存在,必须始终包含至少一个子通道。在任何时候只能有一个子通道处于活动状态。 |
Cull | 基于通常从当前渲染的摄像机获取的 ScriptableCullingParameters 来执行剔除。 |
DrawGizmos | 为给定摄像机调度辅助图标的子集的绘制(在后期处理之前或之后)。 |
DrawRenderers | 调度可见 GameObjects 的子通道的开头。 |
DrawShadows | 为单个光源调度阴影投射物的绘制。 |
DrawSkybox | 调度天空盒的绘制。 |
DrawUIOverlay | Draw the UI overlay. |
DrawWireOverlay | Schedules the drawing of a wireframe overlay for a given Scene view Camera. |
EndRenderPass | 调度当前活动渲染通道的结尾。 |
EndSubPass | 调度当前活动子通道的结尾。 |
ExecuteCommandBuffer | 调度自定义图形命令缓冲区的执行。 |
ExecuteCommandBufferAsync | 对异步计算队列调度命令缓冲区的执行。传入的 ComputeQueueType 会确定队列顺序。 |
InvokeOnRenderObjectCallback | 为 MonoBehaviour 脚本调度 OnRenderObject 回调的调用。 |
SetupCameraProperties | 调度特定于摄像机的全局着色器变量的设置。 |
StartMultiEye | 对 ScriptableRenderContext 调度立体渲染的精细开头。 |
StereoEndRender | 调度立体渲染在单个帧上的完成情况的通知。 |
StopMultiEye | 对 ScriptableRenderContext 调度立体渲染的停止。 |
Submit | 将所有调度命令都提交给渲染循环来执行。 |
EmitGeometryForCamera | Emits UI geometry for rendering for the specified camera. |
EmitWorldGeometryForSceneView | 将 UI 几何形状发射到 Scene 视图以进行渲染。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.