Hello Guest

Author Topic: tk sprite and lighting  (Read 4037 times)

mox

  • Newbie
  • *
  • Posts: 1
    • View Profile
tk sprite and lighting
« on: January 31, 2017, 09:11:30 pm »
Can you help me with understanding of something:

sprite collection, settings, premultiplied alpha not checked, normals only generation.
sprites on scene: atlas0 - LitBlendVertexColor.

If I create a sprite, add point light, sprite gets lit by the point light perfectly. Sprite transform:position x, y, z =0, rotation: 0, 0, 0, scale: 1, 1, 1

If I add the sprite to static sprite batcher, sprite gets black / unlit. I notice the scale is 1, 1, 0 ! If I remove the sprite from static sprite batcher it stays black/unlit. If I correct the scale to 1, 1, 1 Sprite is illuminated again properly. If I correct the scale of static sprite batcher to 1, 1, 1 sprites again get illuminated.

Can you explain what is exactly happening here? What is the correct way to setup tk2d batched sprites for usage of dynamic (point) lighting?

Thanks in advance!