3
//#define float3 float4
6
UpdatePositionsFromVelocitiesKernel(
9
__global float4 * g_vertexVelocities,
10
__global float4 * g_vertexPreviousPositions,
11
__global float4 * g_vertexCurrentPosition)
13
int vertexID = get_global_id(0);
14
if( vertexID < numNodes )
16
float3 previousPosition = g_vertexPreviousPositions[vertexID].xyz;
17
float3 velocity = g_vertexVelocities[vertexID].xyz;
19
float3 newPosition = previousPosition + velocity*solverSDT;
21
g_vertexCurrentPosition[vertexID] = (float4)(newPosition, 0.f);
22
g_vertexPreviousPositions[vertexID] = (float4)(newPosition, 0.f);
b'\\ No newline at end of file'