Is there a way I can light the inverse of a faces normal? My goal is to in two passes light and color the the front of a face then light and color the back. I can color both sides fine, but the lighting calculation for the back is obviously the same as the front of the face. Im trying to stay in shaderLab right now to, my card doesnt like Cg.
At the moment what you can do is manually create two geometries - one for the front face and other (with opposite normals) for the back one. Then use different materials on them. There is no way to negate normals in ShaderLab without writing vertex programs.
Performance wise using two geometries is about the same as using two passes, though it’s somewhat harder to setup (need to manually create the geometry).
Yeah, I got that from peter too. I knew I could duplicate the mesh and flip normals but thats a pain for any model tweaking. Well guess I have to wait for a new card.
Duplicating the geometry manually is especially painful if you want a different material for each side. I imagine it would be a major pain to select and assign materials to geometry that occupies the same space or almost the same space as a copy of itself.
Could doing this also possibly cause problems with mesh colliders?
I think it would cause problems with mesh colliders. If from some reason the object went though a mesh collider it could get stuck inside the object. I will be getting a new GFX card very soon and will get this done with a vertex program. This sahder is really needed and I know a ton of people could use it. Duplication of mesh is just a bad idea… more polys, weird colliders, ect.