Search Unity

Help Wanted Shader Graph TRANSFER_SHADOW equivalent?

Discussion in 'Shader Graph' started by SuperRaffles, Sep 4, 2019.

  1. SuperRaffles

    SuperRaffles

    Joined:
    Jul 25, 2019
    Posts:
    1
    Hello,

    I'm brand new to Unity, and really loving it so far. Coming from my own 3d game engine it's quite blissful having so much done for you out of the box, and a great level editor to boot.

    However, the mobile game I'm porting does require vertex colour and a dynamic curve shader, so I'm having to write my own shader. I've found it pretty easy to get this shader up and running as a Vertex/Fragment shader, a Surface shader, AND in ShaderGraph/LWRP.

    The only problem being dynamic shadows, specifically the shadow shifting and being out of sync with the world, which has dynamically curved vertices. The VF shader is the only one I've been able to rectify, using TRANSFER_SHADOW. However I do really like LWRP, it performs well and I'd like to use it.

    What is the equivalent of this in Shader Graph? Any help would be much appreciated.

    As a reference, here is how the shader looks in Shader Graph, with the custom function being a very simple curve modifier, just moving the vertices in the XY axes, according to their Z position in view space.

    https://i.imgur.com/SpI41GN.png

    Cheers.
     
    Last edited: Sep 4, 2019