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. Dismiss Notice

Question Blend Node Performance

Discussion in 'Shader Graph' started by Wojzax, Apr 12, 2022.

  1. Wojzax

    Wojzax

    Joined:
    Jul 22, 2014
    Posts:
    34
    I want to create shader that will put face parts textures on a face. Different eyes sets, different noses etc.
    The way I choose to do it is by using blend node extensively. Blending eyes texture, blending mouth with mouth color, blending everything basically.
    Would there be a perfomance problem with that node? I cannot use any other node like "Add" because it don't work great with transparency.
     
  2. Oxeren

    Oxeren

    Joined:
    Aug 14, 2013
    Posts:
    120
    Different blend modes only contain a different amount of simple arithmetic and should not impact the performance in any meaningful way. What can be more expensive performance-wise in your case, is the amount of textures you need to sample for face parts. Though if your characters' faces do not fill a big part of the screen and there is not a crazy amount of textures, that should not be an issue either.
     
  3. Wojzax

    Wojzax

    Joined:
    Jul 22, 2014
    Posts:
    34
    Thanks, there are 6 layers of textures, they are not very big though, 64x64. Does the size matters in this situation, or the mere amount of textures?