1. Setting radius to <= 0 -- Fail. (Really small radius works but eats performance - it's also rather a bad idea i admit :P)
2. Setting color and alpha to (0, 0, 0, 0) -- Fail
3. Extending the PointLight class to be able to access the protected "enabled" member and set it to "false" when needed. -- Fail
I know I can remove it from the node. But IMO it's not really the best method.
I also know I can put it into a Node and cull it.
But since a light only lights its children I don't think this works since culling would also hide all its children...
I also want to do this for performance reasons since a lot of lights are really cost intensive.
Is there any way to disable a single light source temporary without removing it from the scene?
But I don't get how to organize them. If I understand correctly they are basicly a Node with a Light attached to it.
So I have the same problem since LightSources only lighten up their children. And I can't put my segments into all LightNodes. Or with other words: I can't add multiple lights to my segments.
Not sure if I am correct. But feel free to correct me :)
|– RootNode
…|– Segments
……|– LightNode 1 (Will only light up segment 1 -> Fail)
…...…|– Segment 1
……|– LightNode 2 (Will only light up segment 2 -> Fail)
…...…|– Segment 2
I would create one light attached to the root node and reposition as needed. If you create a node for every segment, you could use the nodes position to relocate your light.