HDRP Recorder Accumulation Progress Bar in Render?

Hello,

I have a specific workflow where I make short renders using HDRP and Unity Recorder. Aside from a few quirks that need to be worked out, it works very well for my purposes!

One of the quirks I noticed is that there is a progress bar in my renders.
I looked at the Known Issues and saw that the issue was logged, however the workaround suggested that it was due to the Game View being invisible.

I tried to render a few different times, leaving the Game View open every time. I also tried every option that I could for my render.
However, I could not get rid of the progress bar in my recordings. So this prompted me to do some investigating into HDRP Accumulation.

I found the SubFrameManager.cs script, and it executes the Accumulation compute shader, which sends the frame index and the total number of samples.

// Accumulate the path tracing results
ctx.cmd.SetComputeIntParam(accumulationShader, HDShaderIDs._AccumulationFrameIndex, (int)camData.currentIteration);
ctx.cmd.SetComputeIntParam(accumulationShader, HDShaderIDs._AccumulationNumSamples, (int)data.subFrameManager.subFrameCount);

I investigated the Accumulation.compute file and found the reason why my renders were getting the progress bar.

void AddConvergenceCue(uint2 pixelCoord, uint sampleCount, inout float3 color)
{
    // If we reached 100%, do not display the bar anymore
    if (sampleCount >= _AccumulationNumSamples)
        return;

    uint width = _ScreenSize.x;
    uint height = _ScreenSize.y;

    // Define progress bar height as 0.5% of the resolution (and at least 4 pixels high)
    uint barHeight = max(4, ceil(height * 0.005));

    // Change color only in a region corresponding to a progress bar, at the bottom of the screen
    if (pixelCoord.y < barHeight && (float)pixelCoord.x / width <= (float)sampleCount / _AccumulationNumSamples)
    {
        float lum = Luminance(color);

        if (lum > 1.0)
        {
            color /= lum;
            lum = 1.0;
        }

        // Make dark color brighter, and vice versa
        color += lum > 0.5 ? -0.5 * lum : 0.05 + 0.5 * lum;
    }
}

Apparently no matter what, if accumulation is enabled (>1 sub-frames), the progress bar will display.

I temporarily commented this function out because I don’t need this in my renders.

However, if any of the devs on the Unity team are seeing this, I think it would be a good idea to hide the progress bar while the shutter is open and accumulating frames, or at the very least disable it while it is recording at all. This would make rendering cinematics much less painful.

Anyway, thanks for reading!
I hope this post is useful for anyone who is having the same issue. :sweat_smile:

1 Like

Hi! If you are seeing a progress bar, it means you are seeing one of the subframe, not the resulting frame of the accumulation. Does the UI show up at every frame or only from a certain point in the recording?

Would it be possible for you to file a bug report with a repro project? That would be helpful to narrow down the issue. Thank you!