Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

AnimFrame and AnimBlend in Custom Vertex Streams when using with GPU Instancing is very confusing.

Discussion in 'General Graphics' started by AhSai, Feb 11, 2022.

  1. AhSai


    Jun 25, 2017
    After spending a long time trying to figure out how to write a custom shader to work with texture sheet animation blending in particle system that support both GPU instancing and non GPU instancing, here is what I found very confusing.
    When GPU instancing is on, it requires "AnimFrame" in custom vertex stream, and when GPU instancing is off, it requires "UV2" and "AnimBlend". Although the custom vertex stream can be changed with a C# script so that I can check if the device support GPU instancing and set the vertex streams to the correct ones, but is this the way that Unity expect us to do it? or am I missing something? Is there a more convenient or a "general" way to do this?