0
\$\begingroup\$

I am working on a Game Engine(DX11) and we are at a point where we are starting to cull, and order our objects in the scene for rendering order.

However, since we want to instance the same mesh, wouldnt that just overdraw the pixel shader? Since these objects will not alawys be in perfect render order (opaque front to back).

Question: Is there any type of algorithm like A* path finding where we can know if the overdraw is worth it or not to take?

\$\endgroup\$
  • \$\begingroup\$ This sounds like a question you can answer by profiling. We don't know whether your game is more tightly bound by draw calls or by fill rate. If you're draw call bound, combining batches at the expense of some overdraw might be a net savings. If you're fill rate bound, then breaking some batches to get better early z rejection might be a net savings. Or your bottleneck might be elsewhere, and neither change makes an appreciable improvement, so you should go with the simpler option. The only way to know which is to build a test scene and measure its performance on your target hardware. \$\endgroup\$ – DMGregory Aug 17 '18 at 15:19
  • \$\begingroup\$ @DMGregory Okay, I could not find an answer to this question. So there is no set standard way, and sometimes it is logical to take the hit, other times not. I wonder if there is any type of weighted algorithm that gives you odds if the overdraw is worth it to take. \$\endgroup\$ – Mike5050 Aug 17 '18 at 15:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.