The GrabFrameTexture
method in the CommandList
class is used to capture the current frame's texture and return a handle to it. This method is useful for scenarios where you need to access the rendered frame for further processing or effects.
The GrabFrameTexture
method in the CommandList
class is used to capture the current frame's texture and return a handle to it. This method is useful for scenarios where you need to access the rendered frame for further processing or effects.
To use the GrabFrameTexture
method, you need to provide a unique string identifier for the texture and specify whether mipmaps should be generated for the texture.
Parameters:
token
(System.String): A unique identifier for the frame texture. This is used to reference the texture in subsequent operations.withMips
(System.Boolean): A boolean value indicating whether mipmaps should be generated for the texture. Set to true
to generate mipmaps, or false
otherwise.Returns: A RenderTargetHandle
that represents the captured frame texture.
// Example of using GrabFrameTexture CommandList commandList = new CommandList(); string textureToken = "MyFrameTexture"; bool generateMips = true; RenderTargetHandle frameTextureHandle = commandList.GrabFrameTexture(textureToken, generateMips); // Use the frameTextureHandle for further operations