Nehemek
Member
Hello, thanks for checking my topic.
I'm currently developing a 3d particles shader, basically a common method to do particles in 3d is to set up your own system and draw models of two triangles that will represent the 3d particles.
This is painfully slow so say no more to it. I created a single vertex buffer that countains 2*nparticles triangles, then the shader billboards each triangle and can set the speed, gravity, do the calculations etc... but I've hit a wall.
I need to send to the shader position xyz, speed xyz gravity and alpha for each particle, I thought having an array would work but there are limits on array sizes depending on the gpu, so my question is, what can I do?
The second question of my topic is about vertex buffers, maybe I can write the speed and positions directly into the buffer, however wouldn't it be slow to call vertex_create_from_buffer? Is it possible to edit the vertex_buffer with the buffer functions? Or does the vertex buffer has special formatting that do not allow this?
Thanks for your time!
--- Nehemek ----
I'm currently developing a 3d particles shader, basically a common method to do particles in 3d is to set up your own system and draw models of two triangles that will represent the 3d particles.
This is painfully slow so say no more to it. I created a single vertex buffer that countains 2*nparticles triangles, then the shader billboards each triangle and can set the speed, gravity, do the calculations etc... but I've hit a wall.
I need to send to the shader position xyz, speed xyz gravity and alpha for each particle, I thought having an array would work but there are limits on array sizes depending on the gpu, so my question is, what can I do?
The second question of my topic is about vertex buffers, maybe I can write the speed and positions directly into the buffer, however wouldn't it be slow to call vertex_create_from_buffer? Is it possible to edit the vertex_buffer with the buffer functions? Or does the vertex buffer has special formatting that do not allow this?
Thanks for your time!
--- Nehemek ----