Description

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;
 
Steps to Reproduce
  1. Create a new level with basic template
  2. Set directional light mobility to stationally
  3. Open project settings and set Dynamic Global Illumination Method to None
  4. Build lighting
  5. execute "listtextures" console command
  6. Find a row containing TEXTUREGROUP_Shadowmap

Actual Result : the shadowmap texture format is PF_B8G8R8A8
Expected Result : the shadowmap texture format is PF_G8

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-229368 in the post.

0
Login to Vote

Fixed
ComponentUE - Texture
Affects Versions5.4.15.5
Target Fix5.6
Fix Commit38054600
CreatedNov 1, 2024
ResolvedNov 13, 2024
UpdatedNov 20, 2024
View Jira Issue