Class CustomPass
Class that holds data and logic for the pass to be executed
상속된 멤버
네임스페이스: UnityEngine.Rendering.HighDefinition
어셈블리: solution.dll
구문
[Serializable]
public abstract class CustomPass : IVersionable<CustomPass.Version>
필드
| 이름 | 설명 |
|---|---|
| clearFlags | What clear to apply when the color and depth buffer are bound |
| enabled | Is the custom pass enabled or not |
| targetColorBuffer | Target color buffer (Camera or Custom) |
| targetDepthBuffer | Target depth buffer (camera or custom) |
프로퍼티
| 이름 | 설명 |
|---|---|
| executeInSceneView | True if you want your custom pass to be executed in the scene view. False for game cameras only. |
| fadeValue | Mirror of the value in the CustomPassVolume where this custom pass is listed |
| injectionPoint | Get the injection point in HDRP where this pass will be executed |
| name | Name of the custom pass |
메서드
| 이름 | 설명 |
|---|---|
| AggregateCullingParameters(ref ScriptableCullingParameters, HDCamera) | Use this method if you want to draw objects that are not visible in the camera. For example if you disable a layer in the camera and add it in the culling parameters, then the culling result will contains your layer. |
| Cleanup() | Called when HDRP is destroyed. Allow you to free custom buffers. |
| CreateDrawRenderersPass(RenderQueueType, LayerMask, Material, string, SortingCriteria, ClearFlag, TargetBuffer, TargetBuffer) | Create a Custom Pass to render objects |
| CreateFullScreenPass(Material, TargetBuffer, TargetBuffer) | Create a custom pass to execute a fullscreen pass |
| Execute(CustomPassContext) | Called when your pass needs to be executed by a camera |
| Execute(ScriptableRenderContext, CommandBuffer, HDCamera, CullingResults) | Called when your pass needs to be executed by a camera |
| ~CustomPass() | Cleans up the custom pass when Unity destroys it unexpectedly. Currently, this happens every time you edit the UI because of a bug with the SerializeReference attribute. |
| GetCameraBuffers(out RTHandle, out RTHandle) | Get the current camera buffers (can be MSAA) |
| GetCustomBuffers(out RTHandle, out RTHandle) | Get the current custom buffers |
| GetNormalBuffer() | Get the current normal buffer (can be MSAA) |
| GetRenderQueueRange(RenderQueueType) | Returns the render queue range associated with the custom render queue type |
| RegisterMaterialForInspector() | List all the materials that need to be displayed at the bottom of the component. All the materials gathered by this method will be used to create a Material Editor and then can be edited directly on the custom pass. |
| ResolveMSAAColorBuffer(CommandBuffer, HDCamera) | Resolve the camera color buffer only if the MSAA is enabled and the pass is executed in before transparent. |
| ResolveMSAAColorBuffer(CustomPassContext) | Resolve the camera color buffer only if the MSAA is enabled and the pass is executed in before transparent. |
| SetCameraRenderTarget(CommandBuffer, bool, ClearFlag) | Bind the camera color buffer as the current render target |
| SetCustomRenderTarget(CommandBuffer, bool, ClearFlag) | Bind the custom color buffer as the current render target |
| SetRenderTargetAuto(CommandBuffer) | Bind the render targets according to the parameters of the UI (targetColorBuffer, targetDepthBuffer and clearFlags) |
| Setup(ScriptableRenderContext, CommandBuffer) | Called before the first execution of the pass occurs. Allow you to allocate custom buffers. |