21-09-2023, 05:26 AM
(This post was last modified: 21-09-2023, 05:28 AM by josemendez.)
(20-09-2023, 01:12 PM)scionious Wrote: Regarding the above ^ I believe I tried that as many ways as I could, but each time I would get improper lighting. I have a directional light in the scene, and when using this method in URP, I only get light hitting the cloth when the side with normals facing the lighting. If I throw a second material on the mesh to render the back side, there is no option to flip normals so that lighting on the back side of the face is respected. Essentially, what you get is cloth is lit brightly on both sides when the "front" side is facing the light, and no sides are lit when the "back" side is facing the light. All solutions I've tried to find online that allegedly have this normal-flipping feature to get proper lighting all end up not working or show up as pink in the scene.
If you have any ideas on fixing this (or if there is an oversight I'm making), I'd love to pick your brain.
Thanks again for the other answers!
If you want to flip the normals of backfaces, this is trivial to do in ShaderGraph:
Btw, the "Is Front Face" node in shadergraph is equivalent to the VFACE semantic in hlsl, so it's also very easy to write this shader if you prefer hand-written shaders.