1
\$\begingroup\$

At first I thought that ComputeBuffer's could only be used in compute shaders and that GraphicsBuffer's could only be used in materials. But Unity provides overloads for setting ComputeBuffer and GraphicsBuffer to both compute shaders and materials. So how do they differ?

\$\endgroup\$
0
\$\begingroup\$

It seems that they differ in the type of data that they can hold. A GraphicsBuffer can be used for vertex and index buffers, while a ComputeBuffer can be used for any arbitrary data, which is mostly needed for compute shaders.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.