Search Unity

Question Custom shader skinning - edit time distortion

Discussion in 'Graphics for ECS' started by thelebaron, Mar 1, 2022.

  1. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    I've extracted the skinning code from a shadergraph shader, and added its functionality to my own. Runtime it works perfectly, but in edit mode is janky, either invisible or the center is offset by -1 on the y axis, or its offset and distorted.

    How exactly is the _SkinMatrices buffer getting filled during edit time via ShaderGraph? Is skinning strictly a shadergraph feature for 0.50-1.0 or will it also be supported in regular renderpipeline shaders(lit, unlit etc)?


    Unity_W4byXygrPD.png
     
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,266
    The skinning shader does not work with game objects out-of-the-box. The shader graph nodes actually hide input parameters when the Hybrid Renderer is installed.
     
  3. paddan

    paddan

    Unity Technologies

    Joined:
    Jun 19, 2019
    Posts:
    13
    Hello,
    The _SkinMatrices are handled the same way in both editor and play mode. The buffer is not compatible with GameObjects, as they are skinned by the SkinnedMeshRenderer component.
    At the bottom of this page you can see some more information about the current limitations of DOTS Deformations. As far as I know there is no timeline for supporting a workflow without Shader Graph.
    Hope this helps :)
     
    thelebaron likes this.