CVR Blitter
Runs Unity’s Graphics.Blit with optional material overrides, automatic output clearing, and a multi-target mode that uses a GL pass with up to eight color buffers.
Fields
Section titled “Fields”| Name | Type | Description |
|---|---|---|
originTexture | RenderTexture | The input texture used as the source for the blit. |
destinationTexture | RenderTexture | The output texture that receives the blit result (single-target mode). |
blitMaterial | Material | The material applied during the blit operation. |
clearEveryFrame | bool | When on, clears destinationTexture to transparent each frame before blitting. |
destinationTextures | RenderTexture[] | Multi-target mode outputs. Null entries are filtered at Start. |
_MultiTargetBlitMode | bool | Switches to the GL-based fullscreen quad blit that writes into every entry above. |
Behaviour
Section titled “Behaviour”Single-target mode (default)
Section titled “Single-target mode (default)”- If
destinationTextureis null, the blit uses the material’s implicit target (Graphics.Blit(originTexture, material)). - If source and destination point at the same texture, the blit ping-pongs through a temporary.
- Otherwise the blit writes
originTextureintodestinationTexturethroughblitMaterial.
Multi-target mode
Section titled “Multi-target mode”When _MultiTargetBlitMode is true, the component issues a GL pass that draws a fullscreen quad into every color buffer in destinationTextures (using the depth buffer of destinationTextures[0]). blitMaterial must be written to sample _MainTex — the component temporarily overrides that to point at originTexture during the pass.
Execution
Section titled “Execution”By default, the blit runs on Camera.onPreRender for Camera.main. When a CVR Blitter Controller references this blitter, SetupBlitterForExternalControl is called so this component stops driving itself and is triggered in the controller’s order instead.
Source
Section titled “Source”CVR-GameFiles/CVRBlitter.cs