Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

Sprite.GetBlendShapeBuffer

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public GraphicsBuffer GetBlendShapeBuffer(BlendShapeBufferLayout layout);

Declaration

public GraphicsBuffer GetBlendShapeBuffer();

Parameters

Parameter Description
layout The buffer to access. The default value is Rendering.BlendShapeBufferLayout.PerShape.

Returns

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

Description

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

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 Rendering.BlendShapeBufferLayout.PerShape and Rendering.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 Rendering.BlendShapeBufferLayout.PerShape as the argument.

After using this buffer, you should dispose of it.