Jump to content

  • Log In with Google      Sign In   
  • Create Account

Implementing Particle Systems With Shaders


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 arijan   Members   -  Reputation: 104

Like
0Likes
Like

Posted 17 December 2010 - 05:17 PM

Hi all,

For rendering of my particle systems I will be using shaders.

But since I am new to shaders , I wonder if I could implement the
whole particle systems with shaders.

If I did it without shaders , I would have data structures for particles , which
would store positions in world space for sure plus what else needed , so I would store `positions` and also each attribute specific to a single particle.

If it is possible to do the entire implementation with shaders , I should be able to update positions in the vertex shader , but inside shader code even if I store positions of particles , there isnt a way to pass them to the vertex shader unless I call `DrawPrimitive` method of graphics api
to invoke the frontend of GPU, is there ? Or is it why we have geometry shaders
with which we can add geometry to GPU pipeline ?

I am asking the question above because I am confused with the particle system shader implementations inside Nvidia`s FX Composer. There is built in fire fireworks smoke and fountain systems , and in their vertex shaders , the only thing being done is mul ing with worldViewProj classically, but there is nothing about generating/updating positions of vertices, I guess 3d world positions are being passed from the source code of Nvidia FX Composer ?

Besides , what approaches are there to implement particle systems with shaders ?

many thanks

Sponsor:

#2 Jason Z   Crossbones+   -  Reputation: 5284

Like
0Likes
Like

Posted 17 December 2010 - 07:51 PM

This might help clear things up a little bit: Dynamic Particle Systems

#3 arijan   Members   -  Reputation: 104

Like
0Likes
Like

Posted 18 December 2010 - 05:56 AM

Thank you very much for this reply because it really did address the questions in my mind ,

as I can understand , regarding D3D9 , to be able to store state informtion of the particles , CPU should be utilized if I want to implement a generic and a looped particle system

as for D3D10/11 , it seems it can be fully implemented by employing geometry shaders

For Nvidia FX Composer , I think they are creating and updating vertices inside the program code , since apparently it is not being done in shader code. Supporting this , I have downloaded Nvidia`s DX SDK and looked at standalone particle systems samples , same with MS`s , they are using geometry shaders...

#4 Jason Z   Crossbones+   -  Reputation: 5284

Like
0Likes
Like

Posted 18 December 2010 - 08:26 PM

In D3D10, geometry shaders are probably the most attractive way to do this. However, for D3D11 the compute shader is a much better choice for updating the state of the particle system. I started a post about this for a demo I'm working on for our new book here.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS