I've silenced the warnings by crudely referencing the internal variable and function being complained about. For every node that has geometry add the following shader modifier code:
scn::reduce_op(vec4(0, 0, 0, 0), vec4(0, 0, 0, 0));
const metal::sampler s = scn_shadow_sampler_ord_z;
while (&s > &s) {
break;
}
For example:
myNode.geometry?.shaderModifiers?[SCNShaderModifierEntryPoint.surface] =
"""
scn::reduce_op(vec4(0, 0, 0, 0), vec4(0, 0, 0, 0));
const metal::sampler s = scn_shadow_sampler_ord_z;
while (&s > &s) {
break;
}
"""
Post
Replies
Boosts
Views
Activity
@lenk I've just investigated with the profiler and don't see any difference in load times with the code snippet in place. I'm going to remove it from my project. It's nice to silence the warnings but if there's no performance improvement it just introduces unnecessary risk, e.g. changes to the CommonProfile shader.