Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Using shader graph with polybrush

Discussion in 'Shader Graph' started by GamesByKylie, Sep 9, 2019.

  1. GamesByKylie

    GamesByKylie

    Joined:
    Mar 30, 2016
    Posts:
    1
    I'm using LWRP and shader graph in my project, and it would be very helpful if I could use a vertex painting shader for my landscape model. I couldn't probuilderize my model, so I'm trying to use polybrush. I understand that polybrush needs its own shaders and materials and that's why I get the "It doesn't look like any of the materials support vertex color!" message, but what do I do to make a shader graph that does support vertex color? Adding the vertex color node, even if it's not plugged in to anything, makes my shader unlit flat black.

    Just a color plugged into albedo:
    upload_2019-9-9_18-34-21.png
    upload_2019-9-9_18-35-2.png

    The same shader, just with an added vertex color node not plugged in:
    upload_2019-9-9_18-40-8.png
    upload_2019-9-9_18-40-19.png

    It's also worth noting that I can't change anything back once this happens. Switching materials doesn't change it away from flat black, removing the vertex color node doesn't fix it either. The only fix is to delete the mesh and drag in a new instance. I suspect that this may have something to do with the mesh, because unity's primitives don't turn black, but at the same time they can't be painted on either. So how do I get polybrush to vertex paint onto a shader graph shader?

    EDIT: The black happens with any material, not just my custom shader materials. As soon as I click with vertex painting enabled, poof, it's matte black! Hitting the "delete" button on the Z_Additional Vertex Streams fixes it, but clicking again just does the same thing again.