MixedRealityTextMeshPro Sprite shader
Describe the problem
TextMeshPro uses TextMeshPro/Sprite shader to render any custom sprites that you author. This shader does not support single pass instanced rendering nor clipping primitites. So it makes TMP sprites not usable with MRTK.
Describe the solution you'd like
Provide MRTK specific shader for use with TextMeshPro Sprite rendering.
Describe alternatives you've considered
Manually adjust the shader but it does not work and feels hacky. Proper MRTK solution would be better.
Additional context
Link to desired TMP functionality: http://digitalnativestudios.com/textmeshpro/docs/rich-text/#sprite
Hello @mgrman, Thanks for bringing TMP Sprite Shader issue this to our attention! Can you give us a little bit more information about your Unity and MRTK setup? This will help give a starting point for us to reproduce this issue as you saw it. Did you see any warnings or errors in the Unity console when you were trying to initialize custom sprites?
Hi @elbuhofantasma,
the use case we have, is to use ClippingBox to clip text as you scroll. For text we use TextMeshPro.
The problem is that even if you use ClippingBox and set both the TMP renderer and the sprite submesh renderer, the sprite is not clipped.

This sample was created using standard TMP and MRTK, the sprites are EmojiOne which are included in TMP.
If you need any more info to reproduce this, please let me know.
Hello @mgrman Thank you for the detailed information! We will investigate and update this issue when the investigation is finished.
The team and I looked at this issue earlier this morning, and determined that this is a Unity issue. So I marked it as an external bug and will follow up as we get more information from Unity. I am going to keep this issue open in the meantime.
@elbuhofantasma Unity bug? MRTK provides own variant of the main Text Mesh Pro shader for use with clipping box, but does not provide a variant of Text Mesh Pro Sprite shader, which makes sprites in Text Mesh Pro not usable with MRTK Clipping Box.
To me it seems on MRTK to provide a variant of the shader for use with it's own features. Since Unity cannot provide a shader for feature only MRTK has.
Thank you @mgrman for reporting this! I agree this looks like a new feature request/bug we should support. In the MRTK we should fork the TMP sprite shader and add the relevant single pass instanced rendering support and clipping primitive support.
Hello @mgrman, I have written the shader that you have requested in PR #10096. This PR fixes the issue of sprites not clipping with the ClippingBox and not running on devices when Single Pass Instanced Rendering is enabled. I will close this issue when the PR is merged. Thank you again for your feature request!
Here is this shader in action in the editor:
