Progress bar showing up in renders

I love the pathtracer and created a script that renders cameras using a given number of samples. However I found that a camera.render to a renderTexture adds the progressbar seen in the editor, as the image converges to the set number of samples. How can I turn that off?

The only workaround I found is to set the max number of samples to less than the number of samples rendered, so that the progressbar will disappear at the end. But this is not a good workaround since the script might change the number of samples dynamically.

Do you wait the X amount of samples after assigning the render texture tot he camera ? Because when assigning the RT will “clear” the history for that camera and it will have to start accumulating again. I would recommend even waiting for X sample + something like 10 extra frames, just to be sure.

Also, an alternative method is to not use render textures at all. You can set the game view size to the desired output resolution, and directly use Texture2D.ReadPixels() (RenderTexture.active must be null) to read back the game view to the texture you will use to output image files.

Thank you for your reply, but perhaps I did not explain the issue well as your answer is not solving this issue.

The problem is that a grey bar, the progress bar, is rendered. So in my saved images I get grey bars in the bottom, unless I let the image converge to the max samples set in the PT-settings.

I would like to render an image without seeing this gray bar in it.