3

I'm a complete beginner when it comes to shaders, I'm building a project and I need to use Shader Graph in it.

I would like to know if it is possible to render two different things on each side of a face, for example in the normal side render the texture and the normal maps and in the back of the face render a pure black without shadows or lights.

Renan Klehm
  • 158
  • 1
  • 1
  • 9

3 Answers3

5

If you want to set your shader, made by ShaderGraph to render in Two Side mode, you have to enable this option in Master Settings like on the screen:

selezen88
  • 321
  • 3
  • 8
  • I don't want to just show the back face, I want it to show as pure black, no textures, no lights, no shadow and no reflection, just a solid black color – Renan Klehm Feb 13 '20 at 11:13
  • 1
    Then you probably need option "is front side". https://forum.unity.com/threads/shadergraph-make-shader-lit-on-one-side-unlit-on-other.607015/ – selezen88 Feb 13 '20 at 11:54
1

For anyone looking for similar on a newer version, it's under the Graph Settings tab inside of Graph Inspector.

Every answer I found was like above, click the cog, which isn't available on mine.

VirtualLife
  • 402
  • 5
  • 14
0

Well... I kind of figured a way to do it, I think that this isn't optimized at all, but it works flawlessly.

In the inspector I added a second material to the object and I created a new shader using the "Is Front Face" and the "Branch" node to set the normal faces transparent and the "back faces" to show the color I wanted

Renan Klehm
  • 158
  • 1
  • 1
  • 9