struct in UnityEngine.Experimental.Rendering
切换到手册定义自定义渲染管线中使用的状态和绘制命令。
定义自定义 RenderPipeline 时,ScriptableRenderContext 用于设置要提交到 GPU 的状态和绘制命令。
RenderPipeline.Render 方法实现通常会针对所有摄像机剔除不需要渲染的对象(请参阅 CullResults),然后对 ScriptableRenderContext.DrawRenderers 发起一系列调用并混合 ScriptableRenderContext.ExecuteCommandBuffer 调用。这些调用会设置全局着色器属性、更改渲染目标、分发计算着色器和其他渲染任务。最后,调用 ScriptableRenderContext.Submit 执行渲染循环。
另请参阅:RenderPipeline。
DrawRenderers | 绘制可见对象的子集。 |
DrawShadows | 绘制单个光源的阴影投射物。 |
DrawSkybox | 绘制天空盒。 |
ExecuteCommandBuffer | 执行自定义图形命令缓冲区。 |
ExecuteCommandBufferAsync | 对基于传入的 ComputeQueueType 参数选择的异步计算队列执行命令缓冲区。要求命令缓冲区中的所有命令都为适合在异步计算队列上执行的类型。如果缓冲区包含任何不合适的命令,则系统会记录错误并在 Editor 窗口中显示。具体来说,将异步执行的 CommandBuffer 可以包含以下命令:CommandBuffer.BeginSampleCommandBuffer.CopyCounterValueCommandBuffer.CopyTextureCommandBuffer.CreateGPUFenceCommandBuffer.DispatchComputeCommandBuffer.EndSampleCommandBuffer.IssuePluginEventCommandBuffer.SetComputeBufferParamCommandBuffer.SetComputeFloatParamCommandBuffer.SetComputeFloatParamsCommandBuffer.SetComputeTextureParamCommandBuffer.SetComputeVectorParamCommandBuffer.WaitOnGPUFence系统保证缓冲区中的所有命令都在同一队列上执行。如果目标平台不支持异步计算队列,则将工作分发到图形队列。 |
SetupCameraProperties | 设置特定于摄像机的全局着色器变量。 |
StartMultiEye | 精细控制,以开始在脚本化渲染环境中进行立体渲染。 |
StereoEndRender | 指示立体渲染在单个帧上的完成情况。 |
StopMultiEye | 停止在脚本化渲染环境中进行立体渲染。 |
Submit | 提交渲染循环以供执行。 |
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.