cohtml.ViewRendererRP
Renderer implementation for Cohtml View when using Render Pipeline–based rendering using CommandBuffers and render pipeline targets.
Inherits from cohtml.ViewRenderer, IDisposable
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| ViewRendererRP(CohtmlView view) | |
| virtual override void | DrawFrameOnScreen() Draws the view into the active render target. Must be implemented by derived renderer implementations. |
| virtual override void | Dispose() Releases all resources allocated by this renderer, including materials, compute shaders, and command buffers. |
Protected Functions
Section titled “Protected Functions”| Name | |
|---|---|
| virtual override void | ApplyCompositorTextures() Renders all composition textures associated with the current CohtmlView onto the given render target. Used for the Surface Partitioning feature. |
Public Properties
Section titled “Public Properties”| Name | |
|---|---|
| CommandBuffer | CommandBuffer Gets or sets the CommandBuffer used internally to render the View into the active Render Pipeline target. |
| RenderTargetIdentifier | CameraRenderTarget Gets or sets the current camera render target into which the view is drawn. This value is updated per-frame depending on the active rendering context. |
Additional inherited members
Section titled “Additional inherited members”Public Functions inherited from cohtml.ViewRenderer
| Name | |
|---|---|
| void | UpdateSize(uint width, uint height) |
| int | GetCohtmlOriginY() Returns the Y-axis origin convention used by Cohtml for texture UV coordinates. |
| int | GetUnityOriginY() Returns the Y-axis origin convention used by Unity for texture UV coordinates. |
| RenderTexture | CreateRenderTexture(string name, int width, int height, UnityEngine.Experimental.Rendering.GraphicsFormat format, int depth =0, bool enableRandomWrite =false) Creates and initializes a new RenderTexture with the specified dimensions and graphics format. |
| Shader | GetViewShader(CohtmlView view) |
| void | UpdateFlipKeyword(Material material, bool isFlipped) |
| void | SetInWorldMaterial(Material material, RenderTexture texture, bool isTransparent) |
| void | ApplyTransparencyBlendModes(Material material, bool isTransparent) Applies the appropriate blend mode and depth writing (ZWrite) settings to a given material based on whether it should be rendered as transparent or opaque. This updates the hidden _SrcBlend and _DstBlend shader properties used in the material’s shader. Transparent mode: SrcBlend = 5 (SrcAlpha), DstBlend = 10 (OneMinusSrcAlpha). Opaque mode: SrcBlend = 1 (One), DstBlend = 0 (Zero). |
Protected Functions inherited from cohtml.ViewRenderer
| Name | |
|---|---|
| ViewRenderer(CohtmlView view) Initializes the renderer with the specified view. Sets up optional partitioning resources, compute shaders, and filtering materials depending on the current view configuration. | |
| Mesh | SetupQuad() Creates a 1×1 quad mesh with UVs for fullscreen or partitioned UI rendering. |
Public Properties inherited from cohtml.ViewRenderer
| Name | |
|---|---|
| CohtmlView | View |
Public Attributes inherited from cohtml.ViewRenderer
| Name | |
|---|---|
| const string | TextureName |
| const string | MaterialName |
| const string | BackgroundName |
| const string | GlobalBackdropOutputName |
| const string | GlobalBackdropMaskName |
| const string | IntermediateName |
| const string | CameraCopyName |
| IGlobalBackdropFilter | GlobalBackdropFilter |
| readonly int | CameraCopy |
| readonly int | MainTexId |
| readonly int | OverlayTexId |
| readonly int | UVOffsetId |
| readonly int | UVScaleId |
| readonly int | SrcBlendId |
| readonly int | DstBlendId |
| readonly int | ZWriteId |
| readonly int | TopLeft |
| readonly int | BottomLeft |
Protected Attributes inherited from cohtml.ViewRenderer
| Name | |
|---|---|
| const string | CohtmlViewName |
| Mesh | m_QuadMesh |
| Matrix4x4 | m_PixelMatrix |
| MaterialPropertyBlock | m_MaterialPropertyBlock |
Public Functions Documentation
Section titled “Public Functions Documentation”function ViewRendererRP
Section titled “function ViewRendererRP”ViewRendererRP( CohtmlView view)function DrawFrameOnScreen
Section titled “function DrawFrameOnScreen”virtual override void DrawFrameOnScreen()Draws the view into the active render target. Must be implemented by derived renderer implementations.
Reimplements: cohtml.ViewRenderer.DrawFrameOnScreen
Depending on configuration, this may:
- Apply composition textures (UISurfacePartitioning)
- Execute C# backend rendering specific operations
- Apply global backdrop filter feature
- Render the final view texture onto the target
function Dispose
Section titled “function Dispose”virtual override void Dispose()Releases all resources allocated by this renderer, including materials, compute shaders, and command buffers.
Reimplements: cohtml.ViewRenderer.Dispose
Protected Functions Documentation
Section titled “Protected Functions Documentation”function ApplyCompositorTextures
Section titled “function ApplyCompositorTextures”virtual override void ApplyCompositorTextures()Renders all composition textures associated with the current CohtmlView onto the given render target. Used for the Surface Partitioning feature.
Reimplements: cohtml.ViewRenderer.ApplyCompositorTextures
Public Property Documentation
Section titled “Public Property Documentation”property CommandBuffer
Section titled “property CommandBuffer”CommandBuffer CommandBuffer;Gets or sets the CommandBuffer used internally to render the View into the active Render Pipeline target.
property CameraRenderTarget
Section titled “property CameraRenderTarget”RenderTargetIdentifier CameraRenderTarget;Gets or sets the current camera render target into which the view is drawn. This value is updated per-frame depending on the active rendering context.
© 2026 Coherent Labs. All rights reserved.