Search Unity

Bug Enabling GPU Instancing in material on Sliced and Tiled sprites breaks it! (2021.3.0f1)

Discussion in 'Shaders' started by battou, Oct 26, 2022.

  1. battou

    battou

    Joined:
    Jan 25, 2011
    Posts:
    222
    If you have multiple sliced or tiled sprites with same sprite but different Height and Width parameters set and enable GPU instancing in their material (Sprites/Deffault for example) then their height and width geting messed up! They all will get height and width from the first rendered sprite! It appears that GPU instancing in Unity do not set these parameters for each instance (using Material property blocks or whatever). So GPU instancing is unusable for sliced sprites with same image but different size settings!!
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Tried on the latest lts with a blank project already?
     
  3. battou

    battou

    Joined:
    Jan 25, 2011
    Posts:
    222
    No, because out project uses 2021.3.0f1 specificaly. If its a bug in this version - then we will consider migrating our project to another version. But if its possible to fix in 2021.3.0f1 then I would like to know how.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    I don't know. Test it and find out?
    If it still happens maybe make a bug report for now as well
     
  5. battou

    battou

    Joined:
    Jan 25, 2011
    Posts:
    222
    Will test later when I get home. I can't install another Unity version on my pc at work.