- Home /
Additive shader for TextMeshPro ?
Hi,
I’ve been designing a starship HUD interface for my mobile game.
All of its graphical elements are using a Material based on Mobile/Particles/Additive shader, to get that translucent, holographic touch.
I would like to use the same kind of shader for my TMP UGUIs, but couldn’t find one in TMP’s provided shaders.
I assume the solution would be to write my own shader but I don’t have any knowledge about shaders yet. Some help would be much appreciated.
Have a nice day.
Answer by xibanya · Dec 24, 2019 at 02:05 AM
Make a copy of TMP_SDF-Mobile Overlay.shader (if you can't find it, paste the source into a new shader.) change the first line to Shader "TextMeshPro/Mobile/Distance Field Overlay Additive" Change line 77 to Blend One One, which is the additive blendmode.

Then assign the shader to your text's material and you're set! Here pictured: top line is using the default TMP shader, bottom text using this shader, both have the same properties otherwise.

Hi @xibanya, thanx for your quick and efficient reply. Oh my, it seems so simple (when you know how to) ! Thank you SO $$anonymous$$UCH ! Your nice, clear and well documented solution just saved my day !
By the way, a little tip for those who would encounter the same problem as I did : at first, I couldn’t find my custom shader in T$$anonymous$$P’s shaders list. That was only because I didn’t name the file properly. I had named it something like T$$anonymous$$P_additive.shader. Rena$$anonymous$$g it the proper way (T$$anonymous$$P_SDF-$$anonymous$$obile Overlay Additive.shader) solved the issue.
$$anonymous$$erry $$anonymous$$ !
Answer by $$anonymous$$ · Dec 24, 2019 at 03:34 PM
Thanks. Can Textmesh pro be commercially available for game and application? So it's free?
Your answer