mac OS packaging error

tl;dr: Change Project Settings > Platforms > Mac > Targeted RHIs > Mac Metal iOS/tvOS Desktop Renderer Preview (SM5) to be unchecked


I’m now looking at this commit from 5.3.0-preview-1 in particular (commit hash 345666d on the UE GitHub in case the link below gets lost)

Volumetric Support For Mobile - disabled by default in DP · EpicGames/UnrealEngine@345666d (github.com)

This is the commit that modified how the volumetric fog variables are stored, and also added the DISTANCE_FIELD_SKY_OCCLUSION tags to VolumetricFog.usf

This commit tipped me off that maybe I simply need to disable volumetric fog in my project, since the default is off, but I guess my project had it set to true because the project was made on an older version of UE and ported forward. I verified that the value was set to true in my project as well.

So I disabled it (opened project, entered r.VolumetricFog 0 to the command line), this modified my DefaultEngine.ini to set r.VolumetricFog.LightFunction=False.

Attempting to build again however still results in the same errors: /Engine/Private/VolumetricFog.usf:569:22: error: use of undeclared identifier 'GlobalVolumeTranslatedCenterAndExtent' and the other ones posted in the original post as well…


Edit:

I tested packaging a brand new (Third Person Template) project on UE 5.4.4 and it completed successfully. So obviously there is some setting in my project that is holding over from the fact that it is a project that was created in UE 5.1.X which is leading to this error.

By comparing the project settings, I found that the setting at Project Settings > Platforms > Mac > Targeted RHIs > Mac Metal iOS/tvOS Desktop Renderer Preview (SM5) is responsible for the Mac build failing, when it is set to true.

So yeah, setting Mac Metal iOS/tvOS Desktop Renderer Preview (SM5) to be unchecked lets my MacOS packaging complete successfully.

What is this setting doing then?

Well it sets the RHI that is used on Mac to SP_METAL_MRT_MAC, which I guess is the iOS/tvOS RHI for higher end devices (since it is using Metal MRT), but doesn’t support volumetric fog maybe?

If someone could pitch in on what this setting does more specifically, that would be helpful. I’m honestly not sure why/when I enabled it in the first place.

1 Like