[IOS / Metal] Compressed RVT base color looks washed out due to missing ETC2/EAC sRGB pixel format mappings

Summary

In IOS, using compressed RVT base color falls back from BC to ETC2/EAC.

The compressor writes sRGB-encoded color, but the Apple GPU branch of UEToMetalFormat in MetalTexture.cpp leaves ETC2_RGB8 and EAC_RGBA8 in their linear formats.

Sampling therefore skips the hardware sRGB decode.

Root cause
iOS reports BC formats as unsupported, so the RVT base color layer falls back to ETC2 (PF_ETC2_RGB / PF_ETC2_RGBA → MTLPixelFormatETC2_RGB8 / MTLPixelFormatEAC_RGBA8).
That layer is sRGB. It is compressed with CompressBlock_ETC2_SRGB(A), and the material relies on hardware sRGB decoding when it reads it.
In MetalRHI, UEToMetalFormat (MetalTexture.cpp) has no Apple-GPU mapping from ETC2_RGB8 / EAC_RGBA8 to ETC2_RGB8_sRGB / EAC_RGBA8_sRGB. Both the physical texture and its sRGB SRV end up linear, so the sRGB-encoded data is sampled as linear.
It does not reproduce on Mac because BC1/BC3 are supported there and mapped to _sRGB.

Fix
Adding the two missing cases in the Apple-GPU branch of UEToMetalFormat fixes it:
case MTL::PixelFormatETC2_RGB8 : MTLFormat = MTL::PixelFormatETC2_RGB8_sRGB; break;
case MTL::PixelFormatEAC_RGBA8 : MTLFormat = MTL::PixelFormatEAC_RGBA8_sRGB; break;

What Type of Bug are you experiencing?

Rendering (Graphics / Niagara)

Steps to Reproduce

  1. Create a Landscape that writes to a Runtime Virtual Texture with Material Type = Base Color, Normal, Specular
    and Compress Textures enabled.
  2. Use a material (Landscape or foliage) that samples this RVT’s BaseColor.
  3. Package for iOS and run on a device.
  4. Compare with the Editor (also with the iOS ES3.1 preview).

Expected Result

the RVT base color matches the Editor

Observed Result

the RVT base color on device is lighter and desaturated, as if gamma were applied twice.

Affects Versions

5.8

Platform(s)

iOS

Upload an image