Unity: Difference between revisions

38 bytes removed ,  17 August 2019
no edit summary
No edit summary
No edit summary
Line 12: Line 12:


=== Compute Shaders ===
=== Compute Shaders ===
To use a compute shader, add a <source enclose="none">ComputeShader</source> reference to your C# script.
To use a compute shader, add a <code>ComputeShader</code> reference to your C# script.
To copy data to and from the GPU, use a <source enclose="none">ComputeBuffer</source>.
To copy data to and from the GPU, use a <code>ComputeBuffer</code>.
You can copy standard floats arrays as well as Unity Vector2, Vector3, and Vector4 structs.
You can copy standard floats arrays as well as Unity Vector2, Vector3, and Vector4 structs.
<!--
<!--