The positions and velocity are computed by the GPU in render targets , moreover billboarding and tesselation is done by the vertex shader using multistream instancing for uv coordinates and vertex texture fetch for retrieving the positions from the rendertarget.
All rendertarget computations are double buffered.
The collision is simply an horizontal plane for the moment , and the force applied to particle is only gravity and a pseudo random spherical velocity distribution.
This is an interesting feature but the physics collision with arbitrary actors can be a pain to implement.
I will try to add interactivity by adapting the ideas from gpu gems 3 smoke demo wich voxelize arbitrary meshes in runtime in a volume texture to handle response of the velocity field.
Work in progress:
Performance :
GPU : Radeon HD5770
Shader are experimentals and far from optimized but heightmap collision with :
1 000 000 particles @ 90Hz
50 000 particles @ 893Hz
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.