Search Unity

Help Wanted Multiple Master Nodes?

Discussion in 'Shader Graph' started by lordzeon, Aug 11, 2019.

  1. lordzeon

    lordzeon

    Joined:
    Jun 1, 2018
    Posts:
    14
    Hi, i have a doubt on how to do this, i have a shader done in shader graph procedurally generating a sprite with illumination, i want to render this sprite into render textures because i will only change it one time and use it many, but i need to output every "layer" (i mean albedo, normal, occlusion, emission and alpha) as master unlit nodes, but still be able to use the shader as preview in PBR Master, i can think of 2 solutions, maybe there is another, one would be having a duplicate shader, one using the PBR master and the other using unlit just to render to the textures, i want to avoid that because every change to the shader and the properties of the material would need to be duplicated also.

    The other solution would be to be able to activate a different master node depending on the situation, having 1 unlit master node for each layer, and a PBR master would be perfect, but i don´t find how to change it in runtime. If this is not possible, there is any way to change from lit to unlit from code?