Search Unity

Discussion AsyncGPUReadback causes the Editor to update more often

Discussion in 'General Graphics' started by mluchian, Aug 24, 2022.

  1. mluchian

    mluchian

    Joined:
    Aug 24, 2022
    Posts:
    6
    Hey everybody,

    So I noticed an unusual behaviour from the Unity Editor while using AsyncGPUReadback.
    Here's what I am currently doing:
    • I'm building a kind of configuration system based on Raytracing and AsyncGPUReadback.
    • The designer places certain objects in a scene and the system gives him life feadback about the "quality" of his position, e.g. will this object be detected by a camera, or maybe by some other sensor.
    • After the ray tracing step, I need to fetch some of results back from the GPU so that I can give the designer quantitative feedback, e.g. the camera sees the placed object but it's only a couple of rays, so it's not enough "visibility".
    • AsynGPUReadback is done in a ScriptableRenderPass and at the end of the command buffer I call
      WaitAllAsyncReadbackRequests so that I can provide life feedback to the designer.
    Here's the unusual behaviour that I noticed:
    • If I don't fetch the data from the GPU, then the editor updates itself only a couple of times per second, or for example each time I modify something in the scene.
    • If AsyncGPUReadback is enabled, the editor starts updating like crazy. As I have a monitor with a high refresh rate, the update rate rises to almost 200fps.
    The biggest issue right now is that this behaviour is not good for user experience : the computers start working really hard, the fans kicks in, there's a lot of heat generated.
    Does anybody have any idea how to ameliorate this problem? Or maybe this is a bug and I should fill a buf report. Maybe you could tell me what's the cause behind it and how I can stop it.