I really need to be able to create a double sided material.
For example one face (two tris, 1 poly) that shows the material on the reverse side of it.
I know alot of people have enquired about this, but i really can’t afford to physically have the reverse side as part of the geometry.
My actual question is, does unity support this type of material option and if so does it need to be scripted in or is there a prefab or a shader that someone has made that is able to do it
If you want lighting to work properly, you’ll have to use a shader that does two passes: one with backface culling and no changes to normals, and one with frontface culling and flipped normals.
Thank you for your insightful response, maybe if i had spent time making four thousand and something posts i may recall a vague reference to it, but unfortunately i have just the two posts for now.
I have looked alot using the search and all i can find is information from people that don’t really seem to actually know the answer to my specific question and just describe physically making another polygon mirrored fr the solution to a two sided material.
i.e.
“I know alot of people have enquired about this, but i really can’t afford to physically have the reverse side as part of the geometry.”
if you can find a post relating to the material settings i need to use that can answer my question, you may receive a gold star.
or
you may not
either way don’t make condescending posts for the sake of it, its slightly immature, and will waste a lot of your time. Much appreciated.
But to anyone else that may be able to help, i would love some constructive feedback it will help alot as i really can not find any information relating to this and i felt posting a more specific question would be more efficient.
My post was not condescending, it was factual. If you do a search on “double-sided”, you get many relevant results. This is to your benefit, since you would have instantly gotten your answer without having to wait for a reply. Please refrain from reading negative intent into posts where there isn’t any.
Here am I, a complete newb, having to answer such a popular question, shame on you!!! jk
here is my code for a DoubleSided Shader mate. Not like the ones Eric posted, this one is for any model, lighted or not:
The problem with simply turning off backface culling is that lighting won’t work properly. If you use the shader provided above on a plane, you’ll notice that both sides are always the same brightness as one another, no matter where the light source is. This is because when back faces are rendered, they use the same mesh normals as the front faces. Mesh normals are almost always calculated for front faces, and so lighting for back faces will be wrong and ugly.
It’s not a difficult problem, but it’s not as easy as just turning off culling.