shouldUseMipRadianceLayout static method
bool
shouldUseMipRadianceLayout({
- required bool isWeb,
- required TargetPlatform targetPlatform,
- required bool backendSupportsMips,
- required bool? platformMipSamplingWorks,
Applies the backend capability and the measured Android mip sampling probe. Before the probe resolves, Android conservatively stays on the atlas so environments built early are never wrong.
Implementation
@visibleForTesting
static bool shouldUseMipRadianceLayout({
required bool isWeb,
required TargetPlatform targetPlatform,
required bool backendSupportsMips,
required bool? platformMipSamplingWorks,
}) {
if (!backendSupportsMips) {
return false;
}
if (isWeb || targetPlatform != TargetPlatform.android) {
return true;
}
return platformMipSamplingWorks ?? false;
}