Search Unity

Question Custom Decal Shader Graph with emission/glow issue. (HDRP)

Discussion in 'Shader Graph' started by THECAKEISALIE93, Jul 31, 2022.

  1. THECAKEISALIE93

    THECAKEISALIE93

    Joined:
    Sep 16, 2013
    Posts:
    30
    So I made an HDRP decal shader graph specifically for bulletholes/impacts. I have a toggle that lets you dictate if that decal has an emission/glow effect, similar to Doom 2016/Eternal and Gears of War. Everything works great, seeing as it's my first shader graph, although the emission/glow will reset whenever you instantiate another bullethole prefab. I have tried everything I could think of, including manipulating exposed variables via script and I cannot figure it out.

    The effect is supposed to be: You shoot something metal, glow effect will fade over time and then you are left with the bullet decal. What actually happens, bullet decal is instantiated, glow fades. You shoot again, another bullet decal is instantiated, then both bullet holes glow, when it is only supposed to be the new one. I am sorry if none of this makes sense, I am not the best at describing things and if anyone has any constructive criticism, I welcome it. I have pictures of the Inspector, Shader Graph and Script attached. THANKS AHEAD OF TIME!

    GlowScript.jpg Inspector.jpg ShaderGraph.jpg