Search Unity

Question use High Definition RP shaders on a 2D sprite

Discussion in 'Shaders' started by Natssun, Jul 2, 2021.

  1. Natssun

    Natssun

    Joined:
    Jul 2, 2021
    Posts:
    1
    Hi, I am designing with a friend a game where the sprites of the characters and some items are in 2D with a completely 3D background.
    I don't know much about shaders and by searching a little on the internet I found a shader that allows 2D sprites to have a shadow in a 3D space.
    Until then everything was going well but then I wanted to try to make a fog effect on certain lights and I discovered High Definition Rp.
    I installed it correctly, everything works at 3D level, I no longer have the purple bugs on my materials except that the 2D sprites find this bug with the shaders found on the internet, I looked everywhere and couldn't find how repair the shader.
    from what I could see a little the problem would come from the fact that merceaux of code which the shaders to need are not any more in the same place.
    When I go to the unity shader tells me "Material property is found in another cbuffer than 'UnityPerMaterial' (_Function_Use_In_The_Shader)"
    Like I said before, I really don't know much about shader and wanted to know if I had some way to fix it or if there was another solution to stitch HDRP and 2D sprites together.

    (sorry for my english, i'm using google translate to be clear enough)