Hi Community,
We’re currently in the process of moving from Unity 2 to Unity 3 and have come across a bit of trouble regarding the new surface shaders. Quite a few of our pixel-lit shaders uses multiple passes with different alpha tests, blend modes, zwrites, ztests, culling and so on for every pass. What Unity 3 does is to comment out the entire shader telling us to rewrite them using surface shaders. After reading through the documentation, a few tutorials and a few forum posts we can’t really see how our shaders could be transformed into surface shaders, as these seems very limiting.
How can we write a surface shader that for instance uses one pass for front facing triangles and one for back facing triangles and uses different blend modes for the two passes?
As we only use one directional light for the game and don’t use shadows we were thinking of just setting light data in the material, however we feel that it was more convenient the way it worked in Unity 2. As far as we understand it the surface shaders are more or less code generators for what was in Unity 2, so the old build blocks should be there somewhere. Is there a way to use the old pixel-lit shaders, or to access the light data, without having Unity 3 commenting them out?