The “GUI/Text Shader” shader (Font.shader) used by 3D Text is a simple transparent emission-only shader, whereas I need the text to respond to lighting (imagine white text on a sign in a room with a point light).
I have tried all the “Transparent/…”, and writing my own shaders, but they all look as though no light is falling on the text.
Since other meshed work fine, the problem is the mesh generated by Text Mesh, presumably that it has no normals.
In my case, the text is in a fixed location (only the text itself changes), so normals could be set on the Material if necessary.
Here is an image using the “Debug/Normals” shader, showing the text as grey rectangles and normal mesh with normal colors. As you can see, the normals on the TextMesh are (0,0,0) (they become grey because the debug shader adds 0.5), so any perturbing normal provided by the surface shader multiplied with that gives (0,0,0).
The result of this is that the lightDir passed to the lighting function is always 0.