Pet*_*ann 3 scenekit swift metal arkit
升级到 iOS14 后,每当我向场景添加基本节点时,都会收到 Metal 警告。我不使用任何阴影,只使用标准材质。
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);
^
Run Code Online (Sandbox Code Playgroud)
这是我添加的非常基本的节点:
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
Run Code Online (Sandbox Code Playgroud)
它仍然有效,但警告在 iOS13 中不存在。有人知道这究竟是什么意思吗?
小智 6
问题在于,与 iOS 13 上的同一应用程序相比,不仅有警告,而且场景加载速度也非常缓慢(可能与着色器编译时间有关)。在 iOS 14.2 beta 2 上,警告消失了,但场景加载仍然很慢。
这是苹果开发论坛上的相关讨论:https : //developer.apple.com/forums/thread/659856
| 归档时间: |
|
| 查看次数: |
661 次 |
| 最近记录: |