Search Unity

Help Wanted Multiply node previewing as a square? And shader not saving?

Discussion in 'Shader Graph' started by Yoreki, Sep 2, 2019.

  1. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    302
    Hi everyone,
    i just had my first look at the Shader Graph and ran into problems. To get a feel for it, i was trying to create very simple shaders for learning purposes. According to images / videos i saw online, when connecting for example the multiply node to an effect, like fresnel, then the preview in the multiply node should also be this "material-sphere". For me it's just a black box. Or rather a very zoomed in square preview, since i can see some changes when adjusting the fresnel effect to extreme levels.

    multiplySquare.png

    As you can see in the main preview the changes still get applied to the master. I'd just like the multiply node to show a similar preview to the fresnel effect or main preview, which is what i saw in videos. As it is now it kind of feels absolutely useless and i'm not sure what i'm doing wrong.

    Also; is there a save button i'm missing? Because even after pressing ctrl+s, when i close Unity and start it again the shader graph is back to being empty.

    More-or-less-solved Edit: While ctrl+s did not work, saving with the hard to spot button at the top left of the window works.
    As for the multiply preview, in some videos, like below, it's shown as the material preview, while in others it's just a square.
    If anybody knows why it's sometimes a square and sometimes the material preview, i'd still love to know that. I believe i'm doing pretty much the same here. Was it changed in a recent version? I believe the material preview was way nicer if that's the case:
     
    Last edited: Sep 2, 2019
  2. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    96
    There was a bug in some versions where the preview was broken. The intended behavior is that some nodes are 2d squares by default and some are 3d objects, and the 2d preview nodes should inherit the 3d object if a 3d preview is upstream. Some versions don't have that behavior, but it should be fixed in the latest available versions in 2019.x editor versions.
     
  3. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    302
    I'm using the 2019.1.8f1 version, which is where the problem occured. I originally worked on an older project (but with the 2019.1.8f1 editor) which is where the above problem occured. I then created a new project with the LWRP preset and it worked better, even tho it was still a 2D-representation on the multiply node. If i remember correctly tho, i believe it was at least not fully black using the same shader graph.