Search Unity

Quick question - VFX x Shadergraph Vertex Position

Discussion in 'Visual Effect Graph' started by alti, May 11, 2022.

  1. alti

    alti

    Joined:
    Jan 8, 2014
    Posts:
    94
    So i made a shader in hdrp shadergraph using the vertex part, so it could morph and stuff.
    However, when I put it into VFX graph, the parameters I set for color and alpha transfer fine, but the vertex position deformation doesn't work.

    I thought maybe I did something wrong, so I put the shader on a normal low poly plane, and the deformation worked fine.

    Does vfx graph fundamentally not work with the vertex parameter in shadergraph? Or am I missing something?

    I'd share the graphs, but this is more a fundamental question than anything. Has anybody been able to spawn meshes from a vfx mesh output that deformed using the parameters in the vertex portion of the shadergraph asset? Does anybody know why this wouldn't work?
     
  2. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    121
    Hi @alti, yes changes made in vertex stage are supported and should be visible on particles. It would be great to see your setup to identify the root cause. You can share the screenshots here or send me your VFX and SG files.
     
  3. Sooly

    Sooly

    Joined:
    Jan 28, 2021
    Posts:
    19
    Hi, sorry for digging the thread out, but I can't find the answer anywhere.
    Vertex position doesn't seem to work for me in either 2020.3.25f1 or 2021.3.5f1. Shader works fine for HDRP, but Position and everything plugged in is grayed out if I switch it to Visual Effect.
    I got Experimental Operators turned on.
    I attached everything as a package.

    upload_2023-4-17_17-13-44.png
     

    Attached Files:

  4. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
  5. Sooly

    Sooly

    Joined:
    Jan 28, 2021
    Posts:
    19
    Thanks for suggestion but I am on HDRP 10.10.1 in 2020.3 and I can see no such option. Even if I remove Visual Effect from targets, leaving HDRP only. Also cannot upgrade now due to being quite close to the release.
    upload_2023-4-18_10-8-20.png

    In 2021 it works after I set it up the way you wrote, so shader itself is fine.
     
  6. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    I mean if I remember correctly there is no choice, Visual Efect target does not support vertex modification, so either you use new integration or you simply can't access vertex stage.
     
  7. Sooly

    Sooly

    Joined:
    Jan 28, 2021
    Posts:
    19
    Ok then, thanks for the help, hoped maybe there is a way. :)
    I have already started working on making it in a way simillar to the butterflies example but that's a bit more complicated.