Download

Triangle counts in stat rhi are double my mesh triangles?

Hello,
I am noticing that stat rhi is displaying double the triangle count of my meshes. I am trying to nail down why that is happening. In this test scene I have a 24k mesh that when toggled shows a 48k change in triangles. I have dynamic shadows turned off, a simple material on the model, and am using the forward renderer. This image illustrates what I am seeing pretty clearly: 4b0970c4b593ffb2266062f9744da254f108b4ed.jpeg

My project is a VR game- Dynamic shadows put me at 4x triangle cost. Adding stereo rendering pushes it up to 8x cost.

Its also unclear to me if in VR preview I am paying for the editor window in addition to the VR preview window.

I believe someone mentioned that visibility culling doubles the count too. I’m not sure though.

Edit: Right, it’s depth pre-pass probably.

There is a number of features, that require to render the mesh several times, such as depth pre-pass, shadow rendering, etc.

There isn’t any way to disable depth buffer prepass, is there? I set early z-pass to none and i’m not getting the expected change. Is there another setting or cvar I can edit? I understand that turning it off will punish me on the pixel fill side but I think my scene will run better regardless.

Edit:
I was able to get early z pass to turn off after switching to deferred rendering. It looks like the forward renderer forces it on.

You would need to edit quite a bit of engine render code to get rid of prepass in forward shading. It is forced always on with forward.
I bet it is quite unlikely, that not doing pre-pass with forward will be of any positive result,unless your scene is either exceptionally simple in terms of overlapping objects or overwhelmingly geometry-heavy, especially for VR.

P.S. Is it a mesh from photogrammetry on your screenshot ?

I switched my project back to deferred and turned off early Z pass. Deferred fits my project a lot better (aside from anti aliasing issues) and fxaa + super sampling in deferred is working reasonably well.

That low is partially from photogrammetry. I have played around with different workflows for building low poly meshes from scan data and I settled on a mix of 3dsmax pro optimize, manual remodeling of important sections (mostly round stuff) and then manual cleanup of errors. You can see some of the art here if you are curious: http://www.alecmoody.com/21/index.html

I had been building my content pretty fast and loose with triangle counts because I was not expecting to end up triangle bound in VR. I can pretty easily scale back ~40% on most of my objects.