Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Feedback HDRP DXR garbage and performance

Discussion in 'HDRP Ray Tracing' started by cecarlsen, Jun 15, 2023.

  1. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    864
    I have spend days and days optimizing my own code on the pursuit for my desired framerate at 60fps but I am really running out of corners to cut. When I peak at the Profiler it is frustrating to see how much is eaten up by HDRP and DXR. I am sure the DXR team is doing their best, but I just hope they would pay more attention to performance.

    In my project (2023.2.0a16), HDRP+DXR is generating 1.6kb of garbage per frame.

    HDRP_DXR_Garbage1_marker.png

    It seems to be the methods related to ray tracing.
    HDRP_DXR_Garbage2_marker.png

    Especially ray traced reflections.
    HDRP_DXR_Garbage3_marker.png

    Is it really necessary to generate this much garbage? The measurements are from the Editor and I understand the numbers are different in builds, but still, performance in the Editor is important as well.

    I don't know if it makes a difference, but I have a mesh that is being updated by a compute shader using vertex buffer GPU access. The MeshRenderer RayTracingMode is set to DynamicGeometry, so this means a RayTracingAccelerationStructure is being build in the background. Could it be that this part needs love and attention?

    In the last screenshot above you can see that things related to denoising SSR also generates garbage. This puzzles me since I disabled denoising for SSR.
     
    Last edited: Jun 18, 2023
    newguy123 and Lex4art like this.
  2. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hey, thanks for reporting those allocation, we will figure out how to adress it. We are indeed tracking all gardbage for non rayrtacing, but looks like we haven't enabled the option for our raytracing test.
     
    newguy123, cecarlsen, Matjio and 2 others like this.
  3. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    You can track it here if needed !