Jump to content
  • Advertisement
VanillaSnake21

DX11 Why is the wireframe rendering so slow compared to solid?

Recommended Posts

It certainly should, even per frame, under good conditons. Also depends on the number of draw calls and how often shaders are switched and how complex their interfaces are.

When i debug draw my bounding boxes - one per call, just for debug - framerate really drops. That made me incorporate debug drawing directly in the shader and switch via uniform. The shaders are getting longer :-)

Share this post


Link to post
Share on other sites
Advertisement
1 minute ago, Green_Baron said:

It certainly should, even per frame, under good conditons. Also depends on the number of draw calls and how often shaders are switched and how complex their interfaces are.

When i debug draw my bounding boxes - one per call, just for debug - framerate really drops. That made me incorporate debug drawing directly in the shader and switch via uniform. The shaders are getting longer 🙂

That would be understandable, but I'm not drawing anything extra. Just switching the flag on the rasterizer. 

Share this post


Link to post
Share on other sites

Consumer video cards are very slow at wireframe rendering. Their hardware is optimized for filled triangles, since that's what games use. The (very expensive) "pro" video cards will typically be much faster at it, since that functionality is heavily used by DCC and CAD tools.

But before you make too many assumptions you should figure out what your bottleneck. Measuring the FPS alone isn't terribly useful, since it doesn't tell you which part of your frame is slow or why. At the very least you want to figure out if you're bound by the CPU or GPU. Profiling tools can help you with this, or you can you build your own basic profiling utilities into your engine. CPU time is easy enough to measure using high resolution timers like QueryPerformanceCounter, however for GPU timings it's more complicated since you have to use timestamp queries. You also want to be careful not to count the time on the CPU where you wait for the GPU to catch up, which typically happens in Present.

Share this post


Link to post
Share on other sites
Posted (edited)

Nathan's article is the take away for me...thanks huge.

Next I was thinking, sequential writes verses random writes as a performance downer during the raster.

Edited by GoliathForge

Share this post


Link to post
Share on other sites
15 minutes ago, MJP said:

But before you make too many assumptions you should figure out what your bottleneck. 

I ran the profilers, however I can't make heads or tails of it, it's I'm not seeing any hot functions, my startup functions take up quite some time, but I don't see anything that's called every frame as a bottleneck, maybe someone can take a look for me? I'm including the profiler report here, I think it should open, but if not here are some screen shots.

HardwareRasterizer190517(1).vsp

cpugpu.png

prof.png

Share this post


Link to post
Share on other sites
Posted (edited)
15 minutes ago, GoliathForge said:

That state compared to what? Then your attention goes to the diffs to narrow your search. (I think :) )

What article are you referring to? Where are the "diffs" in the profiler view?

Edited by VanillaSnake21

Share this post


Link to post
Share on other sites
Posted (edited)
7 minutes ago, GoliathForge said:

 

That's what I'm seeing, it's showing my engine functions take up 19% of the time, 87% of that is during load, when I'm generating the meshes and compiling the shaders. What should I be looking for? 

Edited by VanillaSnake21

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!