Encode a renderTexture doesn't save HDRP volume overrides

Hello,
all is in the title : I successfully save the rendertexture of a camera but the volume overrides applied to the camera are not saved in the pgn file.
Here is the code :
private void CreatePhoto()
{
RenderTexture rt = new RenderTexture(resWidth, resHeight, 24);
cam.targetTexture = rt;
_screenShot = new Texture2D(resWidth, resHeight, TextureFormat.RGB24, false);
_screenShot.ReadPixels(new Rect(0,0,resWidth, resHeight),0,0);
_screenShot.Apply();
if (!Directory.Exists(Application.persistentDataPath + “/Saves/” + PlayerPrefs.GetString(“username”)))
{
Directory.CreateDirectory(Application.persistentDataPath + “/Saves/” + PlayerPrefs.GetString(“username”));
}
int fileCount = Directory.GetFiles(Application.persistentDataPath + “/Saves/” + PlayerPrefs.GetString(“username”)).Length;
string filename = “Photo” + fileCount;
RenderTexture.active = rt;
var bytes = _screenShot.EncodeToPNG();
System.IO.File.WriteAllBytes(Application.persistentDataPath + “/Saves/” + PlayerPrefs.GetString(“username”) +“/” + filename + “.drk”, bytes);
cam.targetTexture = null;
RenderTexture.active = null;
Destroy(rt);
}
Any idea ?
Thanks.

The problem was my camera. I deleted mine and created another one and it’s ok.