Hello, we have been noticing a regression in the content browser texture thumbnails where a virtual texture would appear brighter once its loaded.
I was able to repro the issue in 5.6 and 5.7
Hello, we have been noticing a regression in the content browser texture thumbnails where a virtual texture would appear brighter once its loaded.
I was able to repro the issue in 5.6 and 5.7
Steps to Reproduce
1-Import texture file
2-Convert texture to virtual
3-Look at the thumbnail becoming lighter
Hi Olivier,
Thank you for the report and repro steps, I was able to repro this behavior in my end. It looks like the thumbnail is being generated with an incorrect sRGB setting. I am looking into it and should get back to you soon.
Best regards,
Vitor
Hi Olivier,
After some investigation, I was not able to pinpoint the exact cause of the problem, but it looks related to CLs 30324010 and 30327472 (git b80335a and b887f69). I just filed an internal bug report so that the engine devs can take a look, here’s the tracking number: UE-357270 (the link should become accessible once the devs mark it as public).
Meanwhile, I believe the following change can be used as a quick-and-dirty workaround: on file [Texture2DPreview.cpp], function FBatchedElementTexture2DPreviewParameters::BindShaders(), look for the place where “Parameters.PackedParams” is set (line 143 on vanilla UE 5.6 from the launcher). Add the following just before that:
float UsedGamma = InGamma;
if (!bIsVirtualTexture && Texture->bSRGB && ((FTextureResource*)Texture)->GetVirtualTexture2DResource() != nullptr)
UsedGamma = 1.0f;
Now, replace “InGamma” with “UsedGamma” on the assignment to “Parameters.PackedParams”.
Please let me know if that works for you!
Best regards,
Vitor
Awesome, thanks for the detailed answer!
I confirm, your code fixed the issue.
Thank you
PM