Search Unity

How access to BLENDWEIGHTS and BLENDINDICES

Discussion in 'Animation' started by fdsagizi2, Jun 24, 2019.

  1. fdsagizi2

    fdsagizi2

    Joined:
    Nov 4, 2013
    Posts:
    70
    In 2019.1 Shaders: Added support for BLENDWEIGHTS and BLENDINDICES semantics in vertex shaders.

    but how we can access to that data in vertex shader?

    i try do so:

    struct vertex
    {
    float4 vertex : POSITION; // The vertex position in model space.
    ...
    float4 weights : BLENDWEIGHT;
    float4 idx : BLENDINDICES;
    };

    but data is empty...
     
    ModLunar likes this.
  2. fdsagizi2

    fdsagizi2

    Joined:
    Nov 4, 2013
    Posts:
    70
  3. felipin

    felipin

    Joined:
    Nov 18, 2015
    Posts:
    49
    float4 weights : BLENDWEIGHTS;
    int4 idx : BLENDINDICES;
     
  4. joshuacwilde

    joshuacwilde

    Joined:
    Feb 4, 2018
    Posts:
    727
    Has to be uint4 on metal
     
  5. Cheng0308

    Cheng0308

    Joined:
    Sep 15, 2013
    Posts:
    1
    Man, you saved my day!