Double-sided shader with shader-graph

13.4k Views Asked by At

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.

3

There are 3 best solutions below

0
Renan Klehm On

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

2
selezen88 On

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:

0
VirtualLife On

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.