在 SceneKit 中,SCNLightTypeAmbient 类型的 SCNLight 是否会忽略 categoryBitMask 参数? [英] In SceneKit, does an SCNLight of type SCNLightTypeAmbient ignore the categoryBitMask parameter?
本文介绍了在 SceneKit 中,SCNLightTypeAmbient 类型的 SCNLight 是否会忽略 categoryBitMask 参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好像!
此处忽略 categoryBitMask:
Here the categoryBitMask is ignored:
ambientLight = [SCNLight light];
ambientLight.color = [UIColor colorWithRed:0.994 green:0.715 blue:0.179 alpha:1.000];
ambientLight.type = SCNLightTypeAmbient;
ambientLight.categoryBitMask = 1;
这里有效!
ambientLight = [SCNLight light];
ambientLight.color = [UIColor colorWithRed:0.994 green:0.715 blue:0.179 alpha:1.000];
ambientLight.type = SCNLightTypeOmni;
ambientLight.categoryBitMask = 1;
推荐答案
没错,环境光的 categoryBitMask 被忽略了(缺少文档).请注意,您可以配置材质以忽略环境照明:
That's right, ambient light's categoryBitMask are ignored (documentation is lacking). Note that you can configure materials to ignore ambient lighting:
aMaterial.locksAmbientWithDiffuse = NO;
aMaterial.ambient.contents = blackColor; (the default)
这篇关于在 SceneKit 中,SCNLightTypeAmbient 类型的 SCNLight 是否会忽略 categoryBitMask 参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文