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

Name
ViewRendererRP(CohtmlView view)
virtual override voidDrawFrameOnScreen()
Draws the view into the active render target. Must be implemented by derived renderer implementations.
virtual override voidDispose()
Releases all resources allocated by this renderer, including materials, compute shaders, and command buffers.

Protected Functions

Name
virtual override voidApplyCompositorTextures()
Renders all composition textures associated with the current CohtmlView onto the given render target. Used for the Surface Partitioning feature.
virtual override voidApplyGlobalBackdropFilter()
Applies the global backdrop filter to the target output before drawing UI elements.

Additional inherited members

Public Functions inherited from cohtml.ViewRenderer

Name
voidUpdateSize(uint width, uint height)
intGetCohtmlOriginY()
Returns the Y-axis origin convention used by Cohtml for texture UV coordinates.
intGetUnityOriginY()
Returns the Y-axis origin convention used by Unity for texture UV coordinates.
RenderTextureCreateRenderTexture(string name, int width, int height, UnityEngine.Experimental.Rendering.GraphicsFormat format, bool enableRandomWrite =false)
Creates and initializes a new RenderTexture with the specified dimensions and graphics format.
ShaderGetViewShader(CohtmlView view)

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.
MeshSetupQuad()
Creates a 1×1 quad mesh with UVs for fullscreen or partitioned UI rendering.

Public Attributes inherited from cohtml.ViewRenderer

Name
const stringTextureName
const stringMaterialName
const stringBackgroundName
const stringGlobalBackdropName
const stringGlobalBackdropMaskName
const stringIntermediateName
const stringCameraCopyName

Protected Attributes inherited from cohtml.ViewRenderer

Name
const stringCohtmlViewName
Meshm_QuadMesh
Matrix4x4m_PixelMatrix
MaterialPropertyBlockm_MaterialPropertyBlock
floatThreadGroupDivisor
intm_VerticalKernelIndex
intm_HorizontalKernelIndex
Vector3Intm_ThreadGroups
ComputeShaderm_HorizontalBlurShader
ComputeShaderm_VerticalBlurShader
Materialm_BackdropFilterMaterial

Public Functions Documentation

function ViewRendererRP

ViewRendererRP(
    CohtmlView view
)

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

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

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

function ApplyGlobalBackdropFilter

virtual override void ApplyGlobalBackdropFilter()

Applies the global backdrop filter to the target output before drawing UI elements.

Reimplements: cohtml.ViewRenderer.ApplyGlobalBackdropFilter