自从升级到 iOS14 以来,每当我向场景添加基本节点时,我都会收到金属警告。
我不使用任何阴影,只使用标准材质。
2020-09-24 18:51:04.548764+0100 Arvie AR[383:7987] [Metal Compiler Warning] Warning: Compilation succeeded with:
program_source:95:26: warning: unused function 'reduce_op'
static inline float4 reduce_op(float4 d0, float4 d1)
^
program_source:581:26: warning: unused variable 'scn_shadow_sampler_ord_z'
static constexpr sampler scn_shadow_sampler_ord_z = sampler(coord::normalized, filter::linear, mip_filter::none, address::clamp_to_edge, compare_func::greater_equal);
^
这是我添加的非常基本的节点:
let target = SCNTube(innerRadius: 0.0, outerRadius: 0.04, height: 0.003)
let basichAnchor = SCNNode(geometry: target)
basichAnchor.geometry?.firstMaterial?.diffuse.contents = UIColor.green
basichAnchor.castsShadow = false
它仍然有效,但在 iOS13 中不再出现警告。
有人知道这到底是什么意思吗?
问题在于,与 iOS 13 上的同一应用程序相比,不仅有警告,而且场景加载速度也非常慢(可能与着色器编译时间有关)。
在 iOS 14.2 beta 2 上,警告消失了,但场景加载仍然很慢。
以下是 Apple 开发者论坛上的相关讨论:https://developer.apple.com/forums/thread/659856 https://developer.apple.com/forums/thread/659856
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)