static void Blit( Material material, RenderAttributes attributes )

robot_2Generated
code_blocksInput

Description

The Blit method in the Sandbox.Graphics class is used to perform a blit operation, which involves copying pixel data from one location to another, typically from a source texture to a destination render target. This method applies a specified material and render attributes during the blit operation.

Usage

To use the Blit method, you need to provide a Material and RenderAttributes as parameters. The material defines how the blit operation should be rendered, while the render attributes specify additional rendering parameters.

Ensure that the graphics context is active before calling this method, as it is a static method of the Graphics class.

Example

// Example usage of the Blit method
Material myMaterial = new Material("path/to/shader");
RenderAttributes renderAttributes = new RenderAttributes();

// Set up any necessary attributes
renderAttributes.Set("SomeAttribute", 1.0f);

// Perform the blit operation
Graphics.Blit(myMaterial, renderAttributes);