Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetBlendShapeBuffer

Retrieves a GraphicsBuffer that provides direct read and write access to GPU blend shape vertex data.
Read time 2 minutesLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

GetBlendShapeBuffer(BlendShapeBufferLayout)

Retrieves a GraphicsBuffer that provides direct read and write access to GPU blend shape vertex data.
public GraphicsBuffer GetBlendShapeBuffer(BlendShapeBufferLayout layout)

Parameters

The buffer to access. The default value is BlendShapeBufferLayout.PerShape.

Returns

Type

Description

GraphicsBufferThe blend shape vertex data as a GraphicsBuffer, or null if the sprite has no blend shapes.

Remarks

The buffer that this method returns is called the blend shape buffer. It contains blend shape vertices, which the GPU uses to deform the sprite mesh into blend shapes.
There are two blend shape buffers that you can access. They use different layout patterns, and contain slightly different data. For more information, refer to BlendShapeBufferLayout.PerShape and BlendShapeBufferLayout.PerVertex. Compute shader support is required to access this buffer.
The version of this method that takes no parameter is equivalent to calling it with BlendShapeBufferLayout.PerShape as the argument.
After using this buffer, you should dispose of it.

GetBlendShapeBuffer()

Retrieves a GraphicsBuffer that provides direct read and write access to GPU blend shape vertex data.
public GraphicsBuffer GetBlendShapeBuffer()

Returns

Type

Description

GraphicsBufferThe blend shape vertex data as a GraphicsBuffer, or null if the sprite has no blend shapes.

Remarks

The buffer that this method returns is called the blend shape buffer. It contains blend shape vertices, which the GPU uses to deform the sprite mesh into blend shapes.
There are two blend shape buffers that you can access. They use different layout patterns, and contain slightly different data. For more information, refer to BlendShapeBufferLayout.PerShape and BlendShapeBufferLayout.PerVertex. Compute shader support is required to access this buffer.
The version of this method that takes no parameter is equivalent to calling it with BlendShapeBufferLayout.PerShape as the argument.
After using this buffer, you should dispose of it.