Hello Guest

Author Topic: Static Sprite Batching with multiple texture atlases  (Read 5390 times)

Takeo Kurita

  • Newbie
  • *
  • Posts: 4
    • View Profile
Static Sprite Batching with multiple texture atlases
« on: July 12, 2013, 09:40:16 am »
Hey,

I want to create an isometric tilemap with 2D Toolkit. As the tile sizes are quite big (to support zooming in), the sprites don't fit into a single texture atlas (of size 2048 x 2048). If I understand correctly, it is possible to have all these sprites in one sprite collection and multiple atlases are built of it. Is it then also possible to use the static sprite batcher for a collection of sprites of different atlases and will it draw them in correct order? (For example using z buffer, as these map sprites overlay, but dont use alpha blending)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Static Sprite Batching with multiple texture atlases
« Reply #1 on: July 12, 2013, 01:35:31 pm »
The static sprite batcher in 2D Toolkit 2.0 supports multiple materials. All solid materials are sorted out anyway, so as long as you position the solid ones in one z layer, and everything else on another z value, you'll be good to go :)

Takeo Kurita

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Static Sprite Batching with multiple texture atlases
« Reply #2 on: July 16, 2013, 09:58:23 am »
Does solid mean the complete texture has an alpha value of 255 or no alpha channel at all? As this is an isometric tilemap, the sprites have to use the alpha channel, but the ground sprites only use 0 or 255 as alpha values, so no real alpha blending has to be done. But they are going to overlap, so the ordering has to be right.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Static Sprite Batching with multiple texture atlases
« Reply #3 on: July 16, 2013, 10:27:20 am »
Solid as in it is using a solid/cutout shader.
Anything else, regardless of alpha values, isn't really solid.

Takeo Kurita

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Static Sprite Batching with multiple texture atlases
« Reply #4 on: July 16, 2013, 10:35:09 am »
A cutout shader should work. I will try that and post feedback. Thank you for the fast support.