Uses of curves in graphics?

Started by
10 comments, last by Atrix256 8 years, 10 months ago
Our curves had arbitrary numbers of control points, and so it was simpler for the particle simulation shader to just have the curves baked down into textures. The shader didn't have to care how many control points there were or even what kind of spline was used, it could just fetch and that was it.

As for performance, it's not necessarily so straightforward. When the curve is baked into textures you just end up with one texture fetch per particle attribute. With arbitrary control points you would need to perform N memory accesses inside of a dynamic loop, which can be slow for per-thread latency since you can't pipeline memory access as well in a dynamic loop. You also have the issue that every warp/wavefront will need to iterate for the worst case of all threads in that group, and so you may end up with some wasted work if you have particles from different systems packed into the same warp/wavefront. For us though, the performance didn't even matter in the end: we used async compute for the particle simulation and it just got totally absorbed by the normal rendering workload.
Advertisement

Thanks for the info (:

This topic is closed to new replies.

Advertisement