[ad_1]
My scene has been developed programmatically and never by an XCode scene file. I might collect that gentle probes will be up to date programmatically by using the updateProbes() of the SCNRenderer class. I’ve the next code, the place I’m attempting to initialize a lightweight probe through the use of the updateProbes() methodology:
SCNNode *probe = [SCNNode node];
probe.place = SCNVector3Make(0.0f, 1.3f, 0.0f);
probe.gentle = [SCNLight light];
probe.gentle.kind = SCNLightTypeProbe;
SCNRenderer* probeRenderer = [SCNRenderer rendererWithDevice:nil options:nil];
probeRenderer.scene = scene;
NSArray<SCNNode*> *probes = [NSArray arrayWithObjects: probe, nil];
[probeRenderer updateProbes: probes atTime:0.0];
Nonetheless, I don’t get any gentle from this lightprobe. Additionally, after I dumped the sphericalHarmonicsCoefficients I see all zeros. What am I lacking?
[ad_2]
