Can I use the graphics card's GPU to create particles?
#1 Members - Reputation: 322
Posted 22 June 2012 - 12:31 AM
My gut tells me you can, but i dont know for sure lol.
And if you can how in D3D9?
#2 Members - Reputation: 4741
Posted 22 June 2012 - 12:54 AM
For sure you can, but it depends somewhat on your requirements. Basicly you can move them along a precalcualted path (i.e. linear or bezier), the next step would be, to save all vertex data in video memory and update them on the GPU alone. What will be really hard is, if you want to add kind of collision detection with the world.Im wanting to draw as many particles as i possibly can, so can i somehow create the on the graphics card and update them there instead of doing any calculations on the cpu?
My gut tells me you can, but i dont know for sure lol.
And if you can how in D3D9?
But with the limitation of D3D9 I would sugguest to stick to a pre-calculated path, the preculculated path could be a simple linear interpolation between two points by a vertex shader, or a 4 point bezier spline interpolation.
My game: Gnoblins
Developer journal about Gnoblins
Small goodies: Simple alpha transparency in deferred shader
#3 Members - Reputation: 362
Posted 22 June 2012 - 12:55 AM
If you're using Direct3D 10/11, you can use geometry shaders to create the particles on the GPU.
#4 Members - Reputation: 322
Posted 22 June 2012 - 01:11 AM
If you're using Direct3D 9, you should probably stick to the CPU. You can also look into Point Sprites.
If you're using Direct3D 10/11, you can use geometry shaders to create the particles on the GPU.
I guess im going to have to start digging in directX 11 *sad face*
#5 Members - Reputation: 173
Posted 22 June 2012 - 04:10 AM
#6 Moderators - Reputation: 5642
Posted 22 June 2012 - 11:37 AM
#7 Members - Reputation: 4028
Posted 22 June 2012 - 01:38 PM
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.






