Jump to content
  • Advertisement
Sign in to follow this  
eppo

Optimizing billboard instancing

This topic is 3758 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm trying to optimize the drawing speed of 2d quads in my D3D app. I've already reduced the number of draw calls by 99% by switching to hardware instancing and all the per-instance world transformations are now done by the GPU. It seems the bottleneck at this point is the work done post-vertex shading. Are there any techniques to speed up the rasterizing process? Like maybe disabling the per-pixel perspective calculations? (You can download it here) Something else: until now I've always happily used the standard edition of Visual C++. Would it help if I compiled this under Pro? I've read the professional version has an optimized compiler, but since most of the work is done by the GPU I'm thinking it probably won't make much of a difference? Thanks [Edited by - eppo on June 12, 2008 7:38:34 AM]

Share this post


Link to post
Share on other sites
Advertisement
If you're rendering 2D quads then I'm guessing that your pixel shader is very simple. In that's the case and you're working on a low-end card, I'd bet 10 bucks that you're either fillrate-limited or bandwidth-limited. You may want to try rendering the quads into a surface whose resolution is lower than that of the actual backbuffer, and then upscaling the result. I've heard of a few console games doing this for their particle effects, and looking at the results I'd say it's a good tradeoff.

Share this post


Link to post
Share on other sites
Wouldn't the blurring caused by the upscaling cause artifacts around the edges where the quads and other 3d geometry meet?

Share this post


Link to post
Share on other sites
Quote:
Original post by eppo
Wouldn't the blurring caused by the upscaling cause artifacts around the edges where the quads and other 3d geometry meet?


Of course. Like I said this is usually used for things like particles where you don't have hard geometry edges anyway (and what you're rendering is basically "fluff" to begin with) so the blurring doesn't matter. If that's unacceptable for what you're doing, then you'd have to find another way to reduce the number of pixels you're throwing at the screen. Are these quads all opaque/alpha-blended/additive-blended?

Share this post


Link to post
Share on other sites
Yes, all of them are alpha-blended (see the demo). When I lower the screen resolution the frame rate increases so I assume at this point the app is limited by my gpu's fill rate.

But at least I can draw as many explosions as I initially wanted after using those instancing techniques described in that Humus demo you pointed out before.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!