Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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;
like image 394
Josh Knowles Avatar asked Mar 22 '15 03:03

Josh Knowles


1 Answers

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)
like image 114
Toyos Avatar answered Nov 15 '22 03:11

Toyos