   Snow in HLSL
  So I can start my next experiment can someone explain the theory and basic implementation of this effect -http://video.filestube.com/video,a62c2fbb064ef90103e9.htmlHe states its all done on the gpu and I wondered vis what process you do this.Also, is it possible to do a snow/dust effect in a deferred environment, I hope so ?Thanks,Dave.   
Quote:Original post by LotusExigeS1He states its all done on the gpu and I wondered vis what process you do this.There are several broad approaches to simulating particle systems entirely on the GPU. My experience is with OpenGL, so I will only describe the process in general terms.The simplest approach is to store all the particle data (position, velocity, life, etc.) in a vertex buffer, and have a second empty vertex buffer of the same size. To update the simulation, you run a vertex shader to perform the update on the first vertex buffer, and use stream out/transform feedback to read the results into the second vertex buffer - swap buffers, rinse and repeat.Another common approach is to perform the same process in the pixel shader, rather than the vertex shader, and thus store the particle data in textures rather than vertex buffers.To render the particles, you can use a geometry shader to generate the 4 corner vertices for each entry in the particle buffer.If you don't have geometry shaders available, or their performance isn't sufficient, you can duplicate the data for each particle 4 times, and use then as the 4 corners of the billboard, respectively.Quote:Also, is it possible to do a snow/dust effect in a deferred environment, I hope so?The answer is 'somewhat'.Most deferred environments don't support alpha-blending very well, in which case you will be fine if you can live with just alpha testing.If you need full alpha-blending, you will have to extend your deferred renderer a little, either by using a forward rendering pass to composite in the alpha-blended particles, or by implementing some sort of stippling technique (such as used with inferred lighting).   ;  Thank you for your fast and informed response.  Using textures is very interesting.  So you pass in a texture with the last frames info in it and render to another target (pixel shader then 'moves' the particles), swap over the textures and repeat.  One thing I dont get, and its basic, how do you set it up so that you are just processing the info in the texture as 1 particle is processed 1 time by the pixel shader. Would you create a screen quad with the same size transformed vertices as the source texture ?Thanks again for your help :O)  and sorry for the noob questions.Dave.   ;  Its ok, I get it.  Just had a play and got it.  Thanks again.   