Hello,
I'm making a double-sided shader and I want to flip the normals of the backfaces in order to have a correct lighting.
I'm aware of the Switch by face and Face nodes but I can't feed them to the Local Vertex Normal ports (console info : doesn't work properly with Vertex ports).
I'm wondering if there's another way to flip the normals of the backfaces ?
Nicolas
Double Sided - Flip backface normals
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Double Sided - Flip backface normals
Hello, you can invert the Vertex Nomals as per the example below:


Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Double Sided - Flip backface normals
Thank you for you anwser.
However my question wasn't how I can invert the normals of a shader with Cull mode = on, but how I can invert the normals of the backfaces created by a shader with the Cull mode = off while keeping the normals of the frontfaces unchanged.
However my question wasn't how I can invert the normals of a shader with Cull mode = on, but how I can invert the normals of the backfaces created by a shader with the Cull mode = off while keeping the normals of the frontfaces unchanged.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Double Sided - Flip backface normals
Apologies for not understanding at first, in that situation you'll have to manually handle the trigonometry through a dot between the view dir and world normal, here's a simple example:

Please note that this setup should work with the vertex offset / normal ports.

Please note that this setup should work with the vertex offset / normal ports.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!