You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
481 B
19 lines
481 B
#pragma kernel CSMain
|
|
|
|
#include "UnityCG.cginc"
|
|
|
|
StructuredBuffer<float4> position_buffer;
|
|
StructuredBuffer<float4> velocity_buffer;
|
|
RWStructuredBuffer<float4> FinalPositionBuffer;
|
|
RWStructuredBuffer<float4> FinalVelocityBuffer;
|
|
|
|
int count;
|
|
|
|
[numthreads(512, 1, 1)]
|
|
void CSMain(uint3 id : SV_DispatchThreadID)
|
|
{
|
|
int final_index = 512 * 424 * count + id.x;
|
|
|
|
FinalPositionBuffer[final_index] = position_buffer[id.x];
|
|
FinalVelocityBuffer[final_index] = velocity_buffer[id.x];
|
|
}
|
|
|