Emit particle from center of triangle


I’m trying to create and manipulate a Buffer coming from the calculation of triangle centers from a mesh. There is probably a better way to do this all in GPU.

Problem is using Mul node to multiply the Position Buffer with a Matrix Buffer doesn’t work but it does if I Add Position to some value (using + node).

Patch : (19.9 KB)

As far as I know, the operation of input a Matrix as a Buffer StructuredBuffer<float4x4> does not work. If you want to use it as a Matrix in your shader, you can use GpuStruct via StructuredBuffer or reconstruct the Matrix from three float3. (35.9 KB)


Super ! lot to learn in here. Thanks a lot.