I currently have a procedurally generated scene of a number of objects, all with baked textures. Their shaders are thus set to “unlit” given that the lighting plays no part in the scene. I would however love to have realtime shadows - they can’t be baked because the scene is generated at runtime.
Does anyone know of an unlit - or alternative - shader that would allow me to do this?
I wound up solving this issue without using a special shader.
Since I was already billboarding my quads with baked textures to the camera, I just adjusted my billboarding code a bit to billboard the normals to the directional light’s angle instead of the camera position. This ensures that the lighting is never affected by the angle of the directional light. Then I just used the Standard Shader in Cutout mode.
mikelo actually got me thinking about the solution with his comment “maybe you can… ignore normals”, and I suddenly thought, “What if instead of ignoring the normal, the normal always faced the directional light, to the same effect?”
I would only use unlit for light emitting materials. Use Standard (in Unity 5) or diffuse (in previous versions). If your scene is too dark, try with a higher ambient color and intensity with these materials, this way you won’t have problems with shadows.