Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Blendshapes and shaders

Discussion in '2019.1 Beta' started by Mullan7, Nov 11, 2018.

  1. Mullan7

    Mullan7

    Joined:
    May 23, 2013
    Posts:
    79
    The latest release notes have this:

    Shaders: Added support for BLENDWEIGHTS and BLENDINDICES semantics in vertex shaders

    If understand right, does this mean it's now possible to use blendshapes on a mesh without a skinned mesh renderer?
     
  2. Kaspar-Daugaard

    Kaspar-Daugaard

    Unity Technologies

    Joined:
    Jan 3, 2011
    Posts:
    150
    Hi, it's the bone indices and weights that are accessible from shaders, not the blend shapes.

    You can access the blend shapes data via script if you want to do your own implementation. FYI blend shapes use compute shaders if available from 2018.3, so the SkinnedMeshRenderer version is pretty efficient. You can also use the BakeMesh() function to write the output to a static Mesh, though that uses the CPU and not GPU.
     
    Mullan7 and richardkettlewell like this.
  3. Mullan7

    Mullan7

    Joined:
    May 23, 2013
    Posts:
    79
    That's really heplful. Thanks for the detailed info!
     
  4. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    387
    Is there a way to force the blendshape compute shader to update? I'm finding the blendshape data becoming incorrect/out of date with a procedurally built mesh when GPU Skinning is enabled. Without, the blendshapes are working as expected.
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Could you please submit a bug report for this issue and reply in here with the issue ID? It would also help a lot if you could provide a smal reproduction project.
     
  6. ReadyPlayGames

    ReadyPlayGames

    Joined:
    Jan 24, 2015
    Posts:
    49
    Are there any examples of BLENDWEIGHTS and BLENDINDICES in use that we can learn from?
     
  7. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,166
    Is that available in all mobile? Or is it fallback to CPU when it not supported?