Mesh Shaders: Why aren't games using them ?

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by bluedevil, Mar 24, 2022.

Tags:
  1. Horus-Anhur

    Horus-Anhur Ancient Guru

    Messages:
    8,578
    Likes Received:
    10,608
    GPU:
    RX 6800 XT
    There might be some confusion, as we are talking about the impact of geometry in RT, but in different stages of the RT rendering process.
    I was talking about acceleration structures for ray-tracing and about ray-box and ray-triangle test. Sorry if I was too vague.
    Remember that one of the first steps of the RT process is the intersection test. In this we must test for each pixel of the frame we need to test all the triangles from the scene.

    Like Akira Fujimoto wrote, regarding the need for accelerating structures (BVH or KD-trees)
     
  2. dr_rus

    dr_rus Ancient Guru

    Messages:
    3,876
    Likes Received:
    1,014
    GPU:
    RTX 4090
    We were talking about mesh shaders. Which have nothing to do with RT per se.

    Tracing rays against triangles is also an RT bottleneck but it's not clear that it would even be an issue with massive amount of triangles since that would make BVH traversal longer but it's not obvious that it would lead to performance issues. RT units are underutilized these days since the main bottleneck is in shading.
    Higher degree of ray divergence will likely have a bigger impact here as it would lead to shading h/w idling more time than it is on "bigger" triangles - while it is already the main bottleneck for performance.
    In any case neither are related to mesh shaders. You can use them without RT or use proxy geometry for RT.
     
  3. Horus-Anhur

    Horus-Anhur Ancient Guru

    Messages:
    8,578
    Likes Received:
    10,608
    GPU:
    RX 6800 XT
    Never heard that RT today is bottlenecked by shader throughput. Where did you get that info?

    What I was saying is that with Mesh Shaders, triangle count will go up, and that's more ray triangle tests to execute.
    And this is probably the biggest performance hog in RT.
     
  4. fellix

    fellix Master Guru

    Messages:
    252
    Likes Received:
    87
    GPU:
    MSI RTX 4080
    Hint: Why Nvidia doubled the FP32 compute rate in Ampere? Those puddle reflections won't shade themselves on a good will alone.

    Ray divergence is one of the prominent bottlenecks against scene complexity growth. More divergence -- more scattered memory access and DRAM is rather poor at random access (despite its own description), particularly from multiple threads. HBM is too expensive, Rambus is still a patent whore and on-chip SRAM/eDRAM is too small at any price point, that's why HW vendors still cram power-hungry GDDR revisions on the boards.
     

  5. cucaulay malkin

    cucaulay malkin Ancient Guru

    Messages:
    9,236
    Likes Received:
    5,208
    GPU:
    AD102/Navi21
    I think that's theoretical fp32 number,as long as no int instructions are being sent.
    but regardless,rt has always been tied to shading performance.I think.
    it's better visualized on a frametime chart.Most of it is still fp+int working while rt cores are being utilized for a very short time.
    I think to achieve best results both have get an increase.Shades in performance,rt cores in what they send to shaders.But that will both be reflected in the fp/int part of the frame.
     
  6. dr_rus

    dr_rus Ancient Guru

    Messages:
    3,876
    Likes Received:
    1,014
    GPU:
    RTX 4090
    Ehm, from everywhere. It's the main bottleneck when RT is added to any game. Even with fully path traced games shading is the main bottleneck - unless it's specifically simplified like in Q2RTX or Minecraft.

    And as I've said this is incorrect. There are ways of avoiding this and the problem is not in triangle counts but in how rays diverge when they hit triangles. Note that this divergence can happen on "big" triangles too since it's really a result of material which this triangle is covered with. It's just that with smaller triangles there will inevitably be more divergence since they will have different world space positioning i.e. even more divergence.

    I know. But the issue is less with bandwidth even and more with the fact that divergence kills SIMD shading.
     
  7. Horus-Anhur

    Horus-Anhur Ancient Guru

    Messages:
    8,578
    Likes Received:
    10,608
    GPU:
    RX 6800 XT
    Can you provide sources?
    I wish to learn more about it.
     
    BlindBison likes this.
  8. Dragam1337

    Dragam1337 Ancient Guru

    Messages:
    5,535
    Likes Received:
    3,581
    GPU:
    RTX 4090 Gaming OC
    As always... old sh1tty consoles holding back tech.
     
  9. SmokingPistol

    SmokingPistol Member Guru

    Messages:
    164
    Likes Received:
    48
    GPU:
    RTX 3090
    History has proven that it is the silicon vendors that are the biggest distractors here for ultimatum growth compared to conslows' publishers, though.

    They can't justify selling to creators, gaming enthusiasts/gurus, etc. a piece of silicon at their requested jacked-up prices if the conslows are matching performance with their so-called "flagship" DT/workstation performance. ;)
     
  10. NEP6XSBW

    NEP6XSBW Member Guru

    Messages:
    142
    Likes Received:
    64
    GPU:
    RTX 4090
    Already available in Justice Online.



    Q: What are you trying to achieve by adding mesh shading to Justice?

    Our first thought is to render some highly detailed models which may need insane number of triangles. Soon we found we can combine Mesh Shaders with auto-generated LODs to achieve almost only-resolution-relevant rendering complexity, instead of polygon number. And we decided to try it out. With so much potential of Mesh Shader, we conceive that it would be the main stream of future games.

    Q: What is not currently working with regular compute / draw indirect / traditional methods?

    The simple draw call just doesn’t work for this. It lacks the ability to process mesh in a coarser grain than triangle, like meshlet culling.

    Compute or draw indirect may be fine, but we do need to make a huge change on the rendering pipeline. The underlying idea of the algorithm is, in the first place, to do culling, then draw the effective parts of mesh. While it can be achieved by culling and compacting with compute shader and then drawing indirect, the data exchange between the two-step process can sometimes be fatal to GPU under highpoly rendering context. Mesh shader solves this problem from the hardware level.

    Q: How do Mesh Shaders solve this?

    Mesh shader can extend the scalability of geometry stage, and is very easy to integrate to engine runtime. It has the ability to encapsulate the culling procedure in a single API call, which omits tedious state and resource set up procedure as draw indirect requires. With MeshShaders, the culling algorithms we use can be of great flexibility. For example, in the shadow pass, we don’t have the depth information so occlusion culling is simply ignored in the shader.

    Q: Is the end result of adding Mesh Shaders something your players will quickly notice, or is the effect more subtle?

    Our technology customizes a highpoly mesh pipeline, including production, processing, serialization, streaming and rendering, aiming to provide our players with a refreshed experience with such high-fidelity contents. Actually, it works. Soon after “Wan Fo Ku” released, our players found the models presented were much more elaborate than the traditional one, with many close-up screenshots posted on the forums. While adding Mesh Shaders under customized highpoly scene do boost the rendering effectiveness, how to optimize our traditional scene remains subtle and needs more engineering efforts.

    Q: What kinds of environments benefited most from the technology?

    Our technology enables the ability of rendering parallax and silhouette of models in an incredible fidelity. For scenes like caves, these details can produce a visually better image. It also provides Chinese ancient buildings, furniture and ornaments with “meticulous” rendering result, which enables the culture carried by them to be expressed in Justice to the finest extent.

    Q: What is the one thing you wish you knew before you added mesh shading? What would you do differently based on your learnings?

    With such detailed models, large texture resolution is a must. We will pay more attention to texture loading or streaming. This also makes further requirements to our mesh/texture compression algorithms.

    Q: Any other tips for developers looking to work with Mesh Shaders for the first time?

    Mesh shader has the possibility of boosting geometry stage drastically. However, careful profiling and optimization is required. We highly recommend NSight for debugging and profiling Mesh Shaders.

    Doing GPU culling with Mesh Shaders will sometimes require a change on mesh representation data format. A clever data format design will enable your trial and error, making a lot faster progress.

    Since 2016, Justice has been closely engaged with NVIDIA in China on video game graphics technology innovation. As one of the best PC MMO games in China market, Justice has attracted thirty millions of players in the past three years with its excellent technologies and beautiful graphics.


    Source: https://developer.nvidia.com/blog/realistic-lighting-in-justice-with-mesh-shading/

    The game is already available in China, and has a Western launch target of Q4 2022.
     

Share This Page