Search Unity

Does the shader compiler auto pack float/int properties into vectors?

Discussion in 'Shaders' started by GearKlik, Jul 6, 2017.

  1. GearKlik

    GearKlik

    Joined:
    Sep 21, 2015
    Posts:
    58
    Hi all, was looking through some compiled HLSL shaders and it looks like float/int properties in ShaderLab are automatically packed into vectors. Is this true? Using Unity 5.6.0f3, only care about DirectX platforms.

    TNKS!

    G
     
  2. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,520
    That is indeed what happens.
     
  3. GearKlik

    GearKlik

    Joined:
    Sep 21, 2015
    Posts:
    58
    Thanks for the confirmation! I've only recently started looking at Unity's shader compile output so wasn't confident of my assessment.