Forum Discussion
BESpectacle
8 years agoProtege
Avatar Hands sorting oddly with transparent objects (TextMeshPro) in Unity.
Transparent objects that should appear in front of the hands getting clipped. Trying to use TextMeshPro but same issue on any transparent material. Saw it in Unity 5.6.4 have since upgraded to Unity 2017.3.1 same issue. Oculus Utilities/Avatar 1.24.
Opaque works, Cutout also works but not useable due to harsh edges. The only thing close that works is a shader from SteamVR - Valve/VR/Silhouette (pictured as a circle) but isn't usable as a font shader.
Opaque works, Cutout also works but not useable due to harsh edges. The only thing close that works is a shader from SteamVR - Valve/VR/Silhouette (pictured as a circle) but isn't usable as a font shader.
5 Replies
Replies have been turned off for this discussion
- BESpectacleProtegeNo I hadn't, I can try this. Thanks,
- BESpectacleProtege@imperativity - I was not able to use the OVROverlay components because it selects a static texture but the TextMeshPro Unity package "texture" is a font atlas and the text is generated in realtime by the shader. Did I miss something?I did have success with an alternative solution based on another forum post: https://forums.oculusvr.com/developer/discussion/comment/491844/#Comment_491844Copied the TMP_SDF shader from the TextMeshPro package and modified the SubShader section to:
Tags
{
"Queue" = "Geometry+10000"
"RenderType"="Outline"
"RenderType" = "Transparent"
}
Blend One OneMinusSrcAlpha
which seems to work for transparent text either in front or behind the Avatar hands. - BESpectacleProtege@imperativity - I was not able to use the OVROverlay components because it selects a static texture but the TextMeshPro Unity package "texture" is a font atlas and the text is generated in realtime by the shader. Did I miss something?I did have success with an alternative solution based on another forum post: https://forums.oculusvr.com/developer/discussion/comment/491844/#Comment_491844Copied the TMP_SDF shader from the TextMeshPro package and modified the SubShader section to:
Tags
{
"Queue" = "Geometry+10000"
"RenderType"="Outline"
"RenderType" = "Transparent"
}
Blend One OneMinusSrcAlpha
which seems to work for transparent text either in front or behind the Avatar hands. - DigibixMemberTry this on the TextmeshPro object:
- Go to the Textmeshpro script section
- Click on Extra Settings...(to open the extra options)
- On the sorting layer row change the order to 10
- BESpectacleProtege
digibix said:
Try this on the TextmeshPro object:- Go to the Textmeshpro script section
- Click on Extra Settings...(to open the extra options)
- On the sorting layer row change the order to 10
This worked too, after changing the "Sorting Layer" from "Default" to "MetaCanvas". Thanks @digibix it's a better solution as it doesn't require maintaining a parallel shader for TextMeshPro.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 3 years ago
- 4 years agoAnonymous