Leaf/cloth shader = shadows on back?

I'm using Shader Forge in Unity to make a shader for translucent cloth. But I can't figure out how to get shadows to show on the back side of the surface. 

I did this a few years ago in a custom game engine. It worked great, but the shader was done under-the-hood, not exposed to me. http://wiki.polycount.com/wiki/Normal_map#Back_Lighting_Example

Shader is on the middle quad here. N dot L is working fine, at least for the front faces.

I tried inverting the normal, and now the backside of the quad is lit. But the shadow is not visible on the backfaces.

Also the unlit part of the shadow-casting long box is showing through the backfaces of the quad.

If I 1-minus the Light Attenuation, the shadow is merely inverted (shadows are white, lit parts are black). The shadow direction is not inverted.


Sign In or Register to comment.