Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Graphics UI Batching and extra parameters

Discussion in '5.4 Beta' started by fpuig, Jan 7, 2016.

  1. fpuig

    fpuig

    Joined:
    Dec 26, 2012
    Posts:
    18
    Sorry to make another thread about the same, but the old one got locked because of the beta5.2 closed.

    Its this something that could be expected to be included in 5.4?
    Or, at least, is it something that its scheduled to happen?
     
    AlteredPlanets and MrEsquire like this.
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,452
    The mesh vertex format now has 4 UV channels, which are either float2, float3, or float4, so you can stuff a lot of extra per vertex information in there..
     
  3. fpuig

    fpuig

    Joined:
    Dec 26, 2012
    Posts:
    18
    You are totally right!!!!
    I have been waiting for this change for so long, that overlooked this addition!

    Thanks a lot!
     
  4. fpuig

    fpuig

    Joined:
    Dec 26, 2012
    Posts:
    18
    Hmm, after some test, it seems that the UI system doesn't use UV3 and UV4.
    It relies on the UIVertex, which only has UV0 and UV1.

    Tried overriding the BaseMeshEffect.ModifyMesh (Mesh mesh) but it looks like internally the extra uvs in the mesh are discarded when batching them.

    Is there any way around that?
    Will it be possible to use extra UVs or have the Normal&Tangent not be normalized (most of the time the UI wont need them anyway and as far as I understood, the new shaders don't need them to be normalized)
     
  5. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    really hope, they add this