Search Unity

Vertex colors for sprite mesh

Discussion in '2D' started by CagatayYildiz, Nov 26, 2013.

  1. CagatayYildiz

    CagatayYildiz

    Joined:
    Aug 7, 2013
    Posts:
    12
    Hi guys, just updated to 4.3 (free)

    I'm developing a hex-based game where I want the hexes to look good and render cheaply (for Android).

    My solution before 4.3 was to just color the hexes with vertex coloring. Done correctly it's cheap!

    What I did was basically draw hex 'borders' by altering the vertex colors at vertices (of the hex mesh) which were going to be borders.

    But in 4.3 I saw that 2d sprites can be batched even while scale isn't uniform and I like that - I want to add some effects like that without increasing draw calls to 300 (I got 300 hexes)

    So I want to do the same vertex coloring in 2D sprites. The documentation says the Sprite Renderer "uses a mesh combined of position, color and UV" is the 'color' here comparable in any way to vertex coloring?

    Any way of doing what I did before in 2D?