问题
It seems to!
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;
Here it works!
ambientLight = [SCNLight light];
ambientLight.color = [UIColor colorWithRed:0.994 green:0.715 blue:0.179 alpha:1.000];
ambientLight.type = SCNLightTypeOmni;
ambientLight.categoryBitMask = 1;
回答1:
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)
来源:https://stackoverflow.com/questions/29190578/in-scenekit-does-an-scnlight-of-type-scnlighttypeambient-ignore-the-categorybit