Number of existing lights in shader

Started by Thomas., March 05, 2012, 01:26:36 PM

Previous topic - Next topic

EgonOlsen

That's not what you really want, isn't it? What you really want is the number of lights that affect an Object3D!? If that's the case, you can already do this in the latest beta. There's this method in Object3D. It has to be executed from within the an IRenderHook or otherwise, the result can be anything.

Quote
/**
* Returns the number of lights that have an influence on this object. This
* is only valid during rendering, i.e. only when called from within an
* IRenderHook.
*
* @return the number of used lights
*/
public int getLightCount();

Thomas.

Yes, yes, yes, thanks, that's exactly what I need :)

Thomas.

If someone interest about speed of per-pixel point lighting on my samsung galaxy S with ICS
1 light - 56 without AA / 49 with AA
2 lights - 45/42
3 lights - 35/30
And on samsung galaxy S2 it is 60 with AA and 3 lights