Texture format override to BGRA8 due to changes in CL-30603716.
The following code can restore the previous behavior.
void FShadowMapPendingTexture::StartEncoding(ULevel* LightingScenario, ITextureCompressorModule* Compressor)
{
...
// Create the uncompressed top mip-level.
TArray< TArray<FFourDistanceFieldSamples> > MipData;
const int32 NumChannelsUsed = FShadowMap2D::EncodeSingleTexture(LightingScenario, *this, Texture, MipData);
Texture->Source.Init2DWithMipChain(GetSizeX(), GetSizeY(), NumChannelsUsed == 1 ? TSF_G8 : TSF_BGRA8);
Texture->CompressionSettings = NumChannelsUsed == 1 ? TC_Grayscale : TC_Default; //work around
Texture->MipGenSettings = TMGS_LeaveExistingMips;
Texture->CompressionNone = true;
Actual Result : the shadowmap texture format is PF_B8G8R8A8
Expected Result : the shadowmap texture format is PF_G8
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-229368 in the post.
| 0 |
| Component | UE - Texture |
|---|---|
| Affects Versions | 5.4.1, 5.5 |
| Target Fix | 5.6 |
| Fix Commit | 38054600 |
|---|
| Created | Nov 1, 2024 |
|---|---|
| Resolved | Nov 13, 2024 |
| Updated | Nov 20, 2024 |