Red Channel wrong using ReadPixel() with RenderTarget

Hello,
I’m making a game where colours are an important part of the gameplay and I have a quite heavy use of RenderTarget to do so.
Recently my colleague worked on a save system and used ReadPixel to save all those beautiful colours that my player put in the level but we discovered that the red channel was empty.

We found a similar problem with the alpha channel being wrong for some user but our alpha channel is seems to work (we don’t really write any important data in it).

Here is the code we use to get pixel datas and save it:

FTextureRenderTarget2DResource *rtResource = (FTextureRenderTarget2DResource*)rt->Resource;
FReadSurfaceDataFlags readPixelFlags(RCM_MinMax);//RCM_UNorm);
readPixelFlags.SetLinearToGamma(false);

TArray<FColor> outBMP;
outBMP.AddUninitialized(rt->GetSurfaceWidth() * rt->GetSurfaceHeight());
rtResource->ReadPixels(outBMP, readPixelFlags);

TArray<uint8> CompressedBitmap;
FIntPoint destSize(rt->GetSurfaceWidth(), rt->GetSurfaceHeight());
FImageUtils::CompressImageArray(destSize.X, destSize.Y, outBMP, CompressedBitmap);

UE_LOG(LogTemp, Warning, TEXT("Before saving, the name is: %s"), *((AColourPlaneActor*)(OverlappingActors[0]))->GetName());

SaveColouration(CompressedBitmap, ((AColourPlaneActor*)(OverlappingActors[0]))->GetName());

// Two image savings for debug
FFileHelper::SaveArrayToFile(CompressedBitmap, *FString("C:\\Users\\marchal\\Desktop\\1-savetofile.png"));
FString ngngng;
FHighResScreenshotConfig& HighResScreenshotConfig = GetHighResScreenshotConfig();
HighResScreenshotConfig.SetHDRCapture(false);
HighResScreenshotConfig.SaveImage("C:\\Users\\marchal\\Desktop\\1-highres", outBMP, FIntPoint(1024, 1024));

Note: We tried to put the texture in UPROPERTY to see if the problem come from the saving or the ReadPixel and we found it come from ReadPixel.

Note2: Some fellow programmers pointed that it could be a pixel format problem so my renderTarget is initialised that way:

_renderTarget = NewObject<UTextureRenderTarget2D>();
_renderTarget->InitAutoFormat(1024, 1024);
_renderTarget->SRGB = false;
_renderTarget->OverrideFormat = EPixelFormat::PF_FloatRGB;
_renderTarget->bNeedsTwoCopies = false;
_renderTarget->AddressX = TA_MAX;
_renderTarget->AddressY = _renderTarget->AddressX;
_renderTarget->ClearColor = FLinearColor::Black;
_renderTarget->UpdateResourceImmediate(true);
_renderTarget->CompressionSettings = TC_Masks;
_renderTarget->bHDR = false;

I don’t have any information on how ReadPixel is checking the format so I’m gonna make some test about that soon and edit this post if that is relevant.

Because it will a major issue for the release of our game we are open for a workaround if there is one.
If the problem is not considered as “high priority” some clue about where the problem should be located inside UE4 would be helpful to make a patch ourselves.

Note3: I have some plugin that does not support UE4.16 yet so I cannot update yet.

By writing this question I realised that some programs sometimes remap values when they are more than 1 according to the maximal value instead of just clamping to 1.
I didn’t expect unreal to do such things that late but it turn out that some values on my texture are way above 1 which make the rest looking wrong.

If you know a way to clamp pixel values to 1 like it is by default in Opengl please comment this response.