1
$\begingroup$

I am about to implement the renderer for a simple particle system. Every particle has to be updated every frame (position, rotation, scale) and so I was wondering which way is usually faster:

  1. Calculate translation, rotation, scale and update the final positions in the vertexbuffer.

  2. Calculate translation, rotation, scale into one transformation matrix and send that one to the GPU Shader for each particle.

$\endgroup$
1
$\begingroup$

Updating the position/rotation/scale in the vertex buffer will use less memory bandwidth—that’s 9 values, where a transform matrix would be either 12 or 16—and the GPU can parallelize the work of turning the position/rotation/scale into a transform for the vertices. I’d go with 1.

$\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.