Monday 15 August 2011

generate vertices using geometry shader(GLSL) -


Recently, I am trying to apply an algorithm to make lace in real time. How do I have to do some CPU, but I want to use the GPU to accomplish this. I was thinking about geometry shaders, but it seems that the geometry shader is implemented on the primitive scale, which means that it will perform the exact same functionality on every primitive, which I do not expect.

Here's my idea of ​​how my Bell works with increasing algorithm. Select any point on an object mesh as the original point, Bell generates a series of points (represented by Bell) according to the previous digit of growing algorithmic output. The position of the digits is influenced by factors like gravity, adhesion and distance for the faces of the triangle. Each point should be similar to the normal face of the triangle.

How can I do this on the GPU? Thanks a lot.

If you want to do something like this, then it does not map well enough regularly in GLSL Pipeline from; Your best bet is to use (If you do not have to apply it in GSLS, you would like to see OpenCL or CUDA as possible option in this case, though note that seller-locked NVIDIA GPUs in CUDA) Using the method you planned, you can use it to generate bell geometry; Then present the vines in a second passage normally

Note that this is only a good idea if your Bell generation algorithm maps well with a broad parallel nature of GPU. If your algorithm is naturally serial, then using the CPU to generate geometry will probably give better results.

No comments:

Post a Comment