Why is the wireframe rendering so slow compared to solid?

Started by
37 comments, last by iGrfx 4 years, 10 months ago

you can drill into those functions to get tighter detail (double click)

Advertisement
3 minutes ago, GoliathForge said:

you can drill into those functions to get tighter detail (double click)

Ok, for example this window here(cpusample image) (using the CPU sampling method):

It only shows one of my engine functions as hot, the rest are system dlls, the function is a software call to draw a bitmap, when double clicking it opens the code, it tells me that Present function is taking up most of the time. I'm not really seeing a realistic bottleneck to cause 80 fps framerates.

 

cpusample.png

softwarerender.png

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

I just want to conclude with something definitive, so everyone agrees that it's normal for the performance to drop 1300% when switching to wireframe mode? 

 

Edit: Also what are some solutions to this? If I want to overlay wireframe over the models, or if I want to use wireframe at any point in the renderings, is there some kind of custom solution that I have to write, a shader or something like that? Is there anything available already?

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

3 hours ago, VanillaSnake21 said:

 

Maybe I'm not using the state correctly? All I did was basically flip the D3D10_FILL_SOLID to WIREFRAME without changing any of the other settings? Also I have a gtx 740 not 960, but how are you getting 1400fps on a 660? Is it faster then solid rendering? Do you mind posting a screenshot? 

Here's a vid I can put in a tri counter if you're really interested. Should only take a few minutes. I Even zoomed in where my frustum culling is dong a lot more work, I'm still getting over 900 fps.  You would think it should be a lot faster in wire frame since the vast majority of pixel shaders don't have to run and they are simple shaders at that. Edit: I just realized the frame rate counter is in the window border so you can't see it, so just take my word for it. It's hovering around 1400 FPS. I just ran it again and double checked.

2019-05-18_00-23-21.mp4
2 minutes ago, Gnollrunner said:

Here's a vid I can put in a tri counter if you're really interested. Should only take a few minutes. I Even zoomed in where my frustum culling is dong a lot more work, I'm still getting over 900 fps.  You would think it should be a lot faster in wire frame since the vast majority of pixel shaders don't have to run and they are simple shaders at that.

2019-05-18_00-23-21.mp4

So what gives? That model looks like it has 3x as many ponys as mine

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

Just for completeness. In my case the framerate drops by 50%. But it is a gtx 970 and my skills do leave room for improvement :-/. For example, i could combine more drawcalls ...Screenshot_2019-05-18_02-15-29.thumb.png.6c0559630561d29865e977f991319abf.png

 

11 minutes ago, VanillaSnake21 said:

So what gives? That model looks like it has 3x as many ponys as mine

Don't know. I just turned off wire frame. It looks like a blob since I'm still working on my lighting system (ha, ha) but it does run a tad faster without wire frame.  However it's not more than 10% difference, maybe 7%.  Maybe it has to do with the way DX11 does culling in different rendering modes. When I  hadn't implemented my frustum culling yet and I was zoomed in, the frame rat dropped to under 20 FPS.  I guess that made sense since the CPU was dong a lot of wasted calls to the GPU. But maybe they have optimized the hell out of shaded culling and didn't bother with wire frame since it's generally for debugging.  I really don't know. I'm just spitballing .

39 minutes ago, Gnollrunner said:

Don't know. I just turned off wire frame. It looks like a blob since I'm still working on my lighting system (ha, ha) but it does run a tad faster without wire frame.  However it's not more than 10% difference, maybe 7%.  Maybe it has to do with the way DX11 does culling in different rendering modes. When I  hadn't implemented my frustum culling yet and I was zoomed in, the frame rat dropped to under 20 FPS.  I guess that made sense since the CPU was dong a lot of wasted calls to the GPU. But maybe they have optimized the hell out of shaded culling and didn't bother with wire frame since it's generally for debugging.  I really don't know. I'm just spitballing .

I'm looking for frustrum culling settings, where can I check if it's enabled? Maybe that's the issue? Also what is that blob? It looks interesting. Is that some kind of adaptive tessellation? Can you just give a brief on what tech/libraries you're using?

40 minutes ago, Green_Baron said:

Just for completeness. In my case the framerate drops by 50%. But it is a gtx 970 and my skills do leave room for improvement :-/. For example, i could combine more drawcalls ...0

 

That looks like a very dense mesh, what framerates is it running at? I'd gladly take the 50 % drop over what I have now (1300% drop). I think you mentioned it earlier, could it have something to do with frustrum culling? I've checked the setting and don't see myself explicitly enabling it aanywhere in the code, maybe I'm not using it and that's causing the issue? Also, that's a pretty nifty terrain, did you write all the code yourself and if you can share what tech/libraries you're using and just explain your project in general?

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

1 hour ago, VanillaSnake21 said:

I'm looking for frustrum culling settings, where can I check if it's enabled? Maybe that's the issue?

I think GPU culling is always on by default.  It's better to do some culling on the CPU side though, so you don't have to send down a lot of useless draw commands. I'm not sure this is your problem, however it's something you should do at some point anyway, so if you implemented it, it wouldn't be wasted effort. Hopefully one of the DX pros ( @Hodgman  ? )   can chime in with better information. I'm pretty much a DX noob, ha ha. 

 

Quote

Also what is that blob? It looks interesting. Is that some kind of adaptive tessellation? Can you just give a brief on what tech/libraries you're using?

I'm not using anything other than DX11 and C++. It's a procedural voxel planet.  I guess it's a planet engine of sorts.  It runs off of simplex noise, but I'll add other functions later. There is no data file. As you zoom in it generates more detailed terrain and throws it out as you zoom out. What it's really doing is generating terrain with smaller voxels in chunks that are closer to the camera. It's kind of of an infinite LOD, or at least up to some practical limit.

I'm working on adding a star for it to orbit and some shading.  It should look better after that. You can look at my blog for more details.   I've been mainly working on the  performance in the last few months so it seems like it hasn't changed much but it's actually a lot faster now. It's using a ton of threading.

28 minutes ago, Gnollrunner said:

 

  

 I'm not using anything other than DX11 and C++. It's a procedural voxel planet.  I guess it's a planet engine of sorts.  It runs off of simplex noise, but I'll add other functions later.

The blogs looks really interesting. Does this require tons of math? I'm working on terrain myself at the moment and even the basic things like getting heights of the terrain at the player position took me lots of time just to find the formulas etc. What kind of a background do you have, if you don't mind me asking? 

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

This topic is closed to new replies.

Advertisement