Author Topic: Number of existing lights in shader  (Read 2106 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Number of existing lights in shader
« Reply #15 on: March 09, 2012, 08:53:16 pm »
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();

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Number of existing lights in shader
« Reply #16 on: March 09, 2012, 09:04:41 pm »
Yes, yes, yes, thanks, that's exactly what I need :)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Number of existing lights in shader
« Reply #17 on: March 10, 2012, 12:37:27 am »
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