Feedback Wanted: Shader Graph

Does ShaderGraph act as a texture packer?
When you use the HDRP Lit Shader, it requires you to have the Base Color in RGB channels and Opacity in Alpha channel.
Currently I do this in an external program.
Can the ShaderGraph do this?

Can we get a gradient property input for shadergraph?

Hi, I am trying to create a toon shader with outline. With shader code I would do two passes:

  • render outline by extruding positions in normal direction and using simple colour for the fragment shader
  • render front faces with unmodified vertex positions and using some model texture modifications

For front faces it works superb, blend node can be used to combine shadows and texture. Huge thumbs up! :smile:
To move vertices in their normal direction, no problem with 2018.2. But how do I extrude back faces and render them with a solid colour and after that make another pass with unmodified vertices with texture and toon shade blend?

To put it another way, how to make two passes, one for back faces and one for front faces?

For reference, this free toon shader does the trick.

Edit:
I can not use two sided on master and use “Is Front Face” node for branching with vertex extrude. It just refuses connection to position.

Hi @ssartell Love the shader. Would you mind explaining what you did to map the _CameraOpaqueTexture correctly? I have been able to access the texture but I can’t work out how to correctly position it on the object. Any help would be greatly appreciated, as I am also trying to create a water shader similar to yours. Many thanks in advance!

On more towards the UX side, How much of a chance of adding node snapping and edge anchors?

It is one of the few things I actually really liked with Unreal’s graph systems where you could align multiple nodes cleanly, as well as anchor a edge so you could easily connect and disconnect a system without having to scroll to the other nodes.

Having multiple of these lines have a pixel of deviance or turning is actually really bothering :frowning:

1 Like

Hi guys, please help!

Trying using Alpha and AlphaClipThreshold to animate a dissolve effect…

  1. Through Package Manager, update HD OR LW Pipeline AND Shader Graph.
  2. Create a new Shader Graph (PBR). Connect a Noise (size 30) node to Alpha.
  3. Create a Time node and connect Sine to a Remap node. Connect to AlphaClipThreshold.
  4. RESULT IN LW: effect works in the graph editor, but not in the scene.
    RESULT IN HD: not working in graph editor nor scene.

Is it supposed to be working?

EDIT: the problem in scene was with my UV map. It is working now in “Play Mode”.

The editor does not show the Alpha animation in HD Pipe, only in LW.

is there a way to look up shader code created by Shader Graph?

Right click the Master Node - Show Generated Code or Copy Shader then paste it in your text editor.

1 Like

(Used version 2.0.5-preview from Package Manager)

Quick usability suggestion: It would be great if automatic compiling could be disabled. It’s really slow and tedious to work with larger graphs simply because any change to the graph results in a re-compile of the shader you’re working on.
Simple toggle to on / off somewhere would suffice. Like automatic lightmap generation can be toggled on and off. If auto compile is turned off perhaps then there could be a button to compile manually.
This alone would probably double my work speed.

Another usability thing would be to be able pan and zoom on the graph while making a connection (holding left mouse button). I’m often trying to connect 2 nodes together that are far apart so not being able to pan and zoom is somewhat annoying.
Same for dragging nodes around. Currently panning works while dragging nodes but the movement is bugged as the node you’re moving moves to opposite direction.

Support for receiving decals on HDRP graphs would be nice but I’m assuming its coming later.

The graph works great otherwise. Haven’t had any major issues so far.
Especially love the fact that writing your own nodes and therefore extending the editor is really straightforward. I’d imagine there will be open source additional node packs eventually when more developers start to use them.

3 Likes

Hello,

I am using the LWRP version 2.0.5 in 2018.2 on a Mac and for all pretty much all my materials I am getting a warning message on the console stating:

Metal: Fragment shader missing buffer binding at index 3 (_LightIndexBuffer / LightweightPipeline/Standard (Simple Lighting))

Metal: Fragment shader missing buffer binding at index 3 (_LightIndexBuffer / LightweightPipeline/Standard (Physically Based))

and also I don’t get any material preview in the material viewport,

Anyone know why/what I can do to fix this?

I also am having issues with the normal map turning black when scaling up meshes when using the shader graph as well.


I need to be able to use Shader Graph to create Materials that I can to Sprites, that are Lit (having normals or not). Also Supporting access to the multiple alpha channels in a TIF file is essential.

I’ve started a collection here already, and will be adding more as I create them.

https://github.com/gilescoope/shader-graph-nodes

1 Like

Is there an example of how _CameraOpaqueTexture is meant to be used to replace a GrabPass?

unity 2018.2 : cant connect vector3 output to the position input, its not clear why 3566691--287517--upload_2018-7-17_14-38-14.png

I think it also depends what you are trying to connect. The vertex position is calculated before the fragment shader executes, so certain operations, such as DDX and fwidth aren’t available. Thus any path which uses these shouldn’t connect to the position input. There are some nodes that it’s unclear why they won’t connect, such as camera > position. And there could be a better indication of why your current connection isn’t working.

I’m try to use Graphics.Blit(Texture2D, RenderTexture, Material);
With standard “unlit” shaders - work 100%, with Shader graph’s “unlit” - nope.
Seems problem somewhere with something from this: “ZTest Always Cull Off ZWrite Off”.
Anyone know how to fix it? (unpainful way plz)

Hey, I’m not sure how to explain this in a Bug Report so I decided to post it here. I’m not sure if others are having this issue as well. I’m using Unity 2018.2.0f2 and Shader Graph 2.0.5-preview.
So in the attached pic I’ve highlighted a field. When I place my mouse cursor over ‘X’ the cursor changes to a mouse cursor with two arrows on either side. When I click and move the cursor left or right, the field value doesn’t change. And when I release the mouse button, the cursor doesn’t change. It remains stuck at the same cursor. After that, when I bring the mouse cursor directly above ‘X’ and move the cursor up and down the field’s value changes. Keep in mind, at the point, I’m no longer holding down the mouse button, I’ve already let go of it. Yet, when I move the cursor directly above ‘X’ the value changes, and anywhere outside ‘X’, the value doesn’t change. This issue isn’t particular to this field or this node. It happens with other nodes too.
Anyone else experiencing this issue?

EDIT: Shortly after making this post I realized how to reproduce the problem. Steps:

  • Create a node. For example, Ellipse.

  • Move your mouse cursor over the Width field, where it says X.

  • Left click and release the mouse button over the X.

  • Then move your mouse cursor out of it. The cursor doesn’t change.

  • Now if you move your mouse cursor over the X again, and just move the mouse up and down (no need to click), the value changes.

3567672--287641--screencap.png

3 Likes

Is it possible to have some form of shadow catching on unlit shader graph aka diffuse with shadows? I’ve added a lambertian algorithm to my unlit shader but it would be nice to be able to include shadows (I know it’s called unlit, but I was expecting it would be the manual type of shader or the basic shader where if you want a custom pbr type shader you can make it there else use the built in pbr shader). I hope I’m making sense.

Basically an Unlit + lambert formula + shadows = custom diffuse. (for mobile purposes) I would very much like to avoid pbr for this project. Though if there wouldn’t be something like it, I’d be forced to test using pbr or to write my own shader.

Just want to know if there are plans for this or if something like this is possible. Thank you.

@JoshPeterson , I do not know what this error means neither. It appears on different workstations, so I believe it is not related to GPU. Changing scripting runtime fixes it, so that should be a reason.
Parse error appears in Unity Editor Console when saving/compiling Shader Graph.

@Carpe-Denius , English

I get this as well. I expected it to behave like in the inspector so you could click and drag to change the value, but if your cursor leaves the value it stops changing and hovering back over starts changing it again.

Fixed in future release: Unity Issue Tracker - [Shadergraph] Node values change on mouse hover after double clicking the value

1 Like