Doing a clipping effect with a 3D text mesh using shaders

I’m using a custom shader on my 3D text objects in order to create an effect where the text is revealed from left to right. I’m doing this with a surface shader that clips all pixels to the right of a certain screen position. This works great, and is just what I wanted, but Unity is throwing a lot of warnings because surface shaders are expected to use normals and the Text Mesh component doesn’t generate any normals.

While this is workable for now, in the long run I need a way to stop getting my console spammed with these warnings. I can think of three approaches: 1) write a fragment shader that clips the text in the same way, 2) suppress the warning (which I’d prefer not to do) or 3) find a way to make the Text Mesh generate proper normals for its geometry. I’m not sure how to do any of these things… can someone point me in the right direction?


the best and i think the only one way to complete this quest is to write a vertex shader. it’s a good in perfomance reason, cause it doesn’t use a lot of calculations like light and others, and it doesn’t use any normals. show a shader u use for text - i’m sure it needs a bit changes to became a vertex 8)