Search Unity

Question Projecting a texture onto a mesh at a position on the mesh

Discussion in 'Shader Graph' started by RogueStargun, Jan 16, 2021.

  1. RogueStargun

    RogueStargun

    Joined:
    Aug 5, 2018
    Posts:
    296
    I was looking to make a procedural damage shader similar to that used in Left4Dead2:
    https://steamcdn-a.akamaihd.net/apps/valve/2010/gdc2010_vlachos_l4d2wounds.pdf

    I was able to recreate the mesh clipping affect in the above document using a spheremask on the alpha of the material.

    I'm having trouble figuring out how the project a texture (ie: a blood splatter) so that the texture falls over the center of where the sphere mask is.

    Does anyone have a good idea on how do achieve this effect?