VirtualTextureStreamingPriority cannot be set per TextureLODGroup

Hello,

I recently worked on assigning the VirtualTextureStreamingPriority for the textures in our project, and I thought about using the VirtualTextureStreamingPriority defined in the FTextureLODGroup.

Unfortunately, due to the FTextureLODGroup::SetupGroup() function, this parameter gets reset to EVTProducerPriority::Normal by the engine.

By removing the line 114, the behavior is now as expected.

This seems like a mistake in the engine code, so I thought I would let you know.

Best regards,

Thomas

[Attachment Removed]

Steps to Reproduce

  • Modify any DeviceProfiles.ini (Base, Default, Windows, etc…)
  • In the TextureLODGroups array, add a group with a VirtualTextureStreamingPriority
TextureLODGroups=(Group=TEXTUREGROUP_World,MinLODSize=1,MaxLODSize=16384,LODBias=0,MinMagFilter=aniso,MipFilter=point,MipGenSettings=TMGS_SimpleAverage,VirtualTextureStreamingPriority=AboveNormal)
+TextureLODGroups=(Group=TEXTUREGROUP_WorldNormalMap,MinLODSize=1,MaxLODSize=16384,LODBias=0,MinMagFilter=aniso,MipFilter=point,MipGenSettings=TMGS_SimpleAverage,VirtualTextureStreamingPriority=AboveNormal)
etc...
  • Launch the Engine
  • Notice that any texture related to this group will use the correct VirtualTextureStreamingPriority when streamed

[Attachment Removed]

Hi Thomas,

I am trying to verify your reported issue with the texture LoD groups, but I would appreciate some clarification on one step:

“Notice that any texture related to this group will use the correct VirtualTextureStreamingPriority when streamed.”

Could you please provide me with some more information on how you verified this?

[Attachment Removed]

Hi Thomas,

Thanks for the info. I can definitely reproduce your issue on my end, so I will check in with the owner of that code to see if they can fix this bug with your proposed fix. I will get back to you once I have some updates. Please let me know if you have any questions in the meantime.

[Attachment Removed]

Hi Thomas,

A fix is going to be released very soon, likely by the end of the week. If you want to track the progress of the fix, please take a look at the public issue tracker here:

Unreal Engine Issues and Bug Tracker (UE\-357594\). If you have any further questions, please let me know. Thank you again for reaching out to us!

[Attachment Removed]

Hi Tim,

I verified this by adding a breakpoint in Texture2D.cpp line 1577 in the constructor of FVirtualTexture2DResource.

The VirtualTextureStreamingPriority sent by the TextureLODSettings->GetTextureLODGroup(InOwner->LODGroup) is not correct.

[Attachment Removed]

By the way, the CL mentioned in the public issue tracker is incorrect. If you want to get the patch already, it should be available in UE5-Main CL 49160744.

[Attachment Removed]