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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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:
    692
    Has to be uint4 on metal
     
  5. Cheng0308

    Cheng0308

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