In SceneKit, does SCNLight of type SCNLightTypeAmbient ignore the categoryBitMask parameter?

It seems!

Here 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 he 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; 
+5
source share
1 answer

That's right, the BitMask ambient class is ignored (no documentation). Note that you can set materials to ignore ambient lighting:

 aMaterial.locksAmbientWithDiffuse = NO; aMaterial.ambient.contents = blackColor; (the default) 
+8
source

Source: https://habr.com/ru/post/1215846/


All Articles