Graphics, Programming, Unity, Tutorial, Technology.
triangle front face is visible. Unity also provides another macro to choose a value based on frontFace, like the ternary operator in C#. Use that to either multiply the normal vector by 1 or -1 before setting it in lightingInput. So, that fixes lighting, but triangle back faces now have shadow