A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'UGUI & TextMesh Pro' started by dgoyette, Apr 12, 2019.
this is quite embarrassing...
We've just launched a game on Steam that uses Hdrp, and it still has this SDF issue in it. All our 'in world' TMP signage draws on top of fog and other transparent objects. Its flagged in our bug database as a 'Major' issue, and as the Lead Artist its rather annoying to say the least.
I now have a baseline Unlit and Lit URP & HDRP shader graph working in version 11.0.0 of the URP and HDRP package. These are still missing the custom material inspector which will be necessary but still in a state where I could release them for testing and getting feedback.
- These support Face + 3 Outline + Underlay.
- Outlines can be offset to fake a 3D look as seen below.
- Special mode to have the last Outline layer encompass the previous outline layers.
- Face and Outline texturing is not working yet and will require a new version of the TMP package with revised UV layout. Currently the UV coordinates for texturing are encoded in UV2 x and SDF Scale in y. In the current shaders, the decoding is handled in the vertex shader which is not yet possible in Shader Graph.
- The current graphs require version 11.0.0 of URP / HDRP / Shader Graph. However, it will be possible to provide the same functionality in the version of URP / HDRP / Shader Graph in 2019.4 via a separate set of graphs for those specific versions of those packages.
I will continue to work on the set of graphs for version 11.0.0 of Shader Graph and try to release those as preview early next week.
Here is another example using multiple outlines with offset + bevel to create a simulate 3D look.
By baseline, I mean an initial set of graphs with all the bell & whistles. Then later down the road and if needed, we can look at creating variants of these trading features for added performance.
yay, that is something! Thanks! I would really like to test those out.
One question tho: couple of weeks before we discussed the starting version for it, and iirc version 10 was agreed upon. Yet you decided to base it on 11 which will make it unavailable for next LTS release. What made you chose this version disregarding our previous conversation?
I might be misinterpreting Stephan, but this phrase seems to state that it will be available for 2019.4+:
I'd like to know more about this too. URP 11 not being available in 2020.2.
To clarify, I do plan on releasing versions of those new shaders for previous releases of Shader Graph back to 2019.4.
There will be a set for 2019.4, 2020.x and 2021.x.
Right now I am trying to wrap up the release of version 1.5.4, 2.1.4 and 3.0.4 of the TMP package where some changes will be included related to these new shaders.
Once these new packages are available (something I was hoping to get done earlier this week and still in progress), I will release (here) the Shader Graph version 11.0.0 for testing and then work to manually recreate them for earlier versions of Shader Graph and then release those as well.
will it be possible with this update to have Lit TMP text that receives shadows in URP? and is there any news on an ETA for this?
The new releases described in my previous post should be available tomorrow.
I will then take the next few days / weekend to work on the shaders and make a determination on Monday as to whether or not I can release those in advance of the next preview releases of the TMP package which would include the new material inspectors and necessary changes to other parts of TMP specific to these new shaders.
I will provide an update by end of day Monday.
Again, the plan is to first release an initial set for the newer versions of UPR / HDRP but to shortly thereafter follow up with releasing those for 2019.4 and versions of URP / HDRP in between.
Do the new versions support setting the render order of TMP? For example, I have some World-space canvases that currently don't render at all if you look at them through a "Before Refraction" transparent shader. And the main thing I've been talking about for a while now has been being able to set my HUD's TMP object to "After post-process". I wasn't sure whether those settings were included in the new shaders.
Can't you just render them on their own layer with a Custom Pass after post process?
I really have no idea... Do you know of any documentation around how you get TMP to render in a custom pass?
Using the test scene you provided a while back, I was able to achieve the result you desired with it.
The "After post-process" is an HDRP feature where those options will be available in the custom material inspector for the new shader graphs.
If you have another "test scene / project" you would like me to test with please by all means provide it.
No, that answers my question. Thanks.
Still working on the shaders, will provide an update tomorrow.
So, tomorrow huh?
Have a little more patience lol. Programming is really hard and it's easy to underestimate the time required. Stephan does amazing work for us, let's give him a couple days of leeway on this
Agree. Couple of post up I posted the conversion of the mobile TMP shader to URP. Took me 3 full days during x-mas break. And it’s bare bone, no config GUI etc. Pretty sure all the variants for HDRP, URP, versions to support different shader graph, validation, dependencies and everything else that is surely going on would easily blow this time up 20 fold, 50 fold...
Putting aside the shader graphs themselves, evolving SRP and whatever work that entails, it is everything else as the world of text doesn't stand still with issues to address and equality important features to deliver often pulling me away from the shaders.
I am doing my best to get these new shaders released as soon as possible while keeping everything else running and moving forward.
use @jbooth's better shader
My bad, sorry, didn't meant to sound rude. I know it's a very complicated issue, it's just that we are 1 month away from the 2 year anniversary of this thread and working on a game for so long with the text clipping on top of meshes can get a tad annoying.
But I wish Stephan all the luck and patience with this issue.
I wish there were ways for people like Stephan, the SpeedTree team or us to actually have a say in the company priorities.
HDRP is great but things like customisable text and performant tree rendering are huge things that many, many games need (if not the majority of 3D games). This thread is two years old, that's enough time for someone to learn programming and replace Text Mesh Pro entirely with a Shader Graph based text system.
I find it odd that my shader graphs for text mesh pro come from the community. 2 Years to support a surface shader for the future pipeline.
It's certaintly quite an odd priority for Unity honestly, since this is a major bug of a major feature, and 2 LTS versions have been released since this issue was brought to light.
We actually started on 2019.2 (HDRP 6 Beta), now we updated to 2020.3 (LTS, HDRP 10 Verified), and the issue was always there. I'm surprised that any producers inside Unity never tried to create a very common World Space TMPro, they would instantly realize how important of a feature isn't working properly and tag it's relevance as High.
Not there yet but getting closer...
URP Lit Shader
Camera view - HDRP Lit Shader
Scene view behind the text object.
Nice to see some text in HDRP! I'm wondering how it looks if you turn on Fog post processing?. One issue I have is that all text renders on top of Fog/Volumetric light with HDRP and TMP.
Everything else in the Unity universe is released in preview but not TMP. Here have some pictures.
This is the only missing feature in unity holding me back from going URP and getting some awesome lightning effects, keep up the good work Stephan.
Perhaps we should open up a ticket, tag it as Critical/Urgent, vote it, so we can help Stephan have all the time in the world to fix it quickly.
This looks awesome!!! Do you have any ETA on a preview release?
At long last, here is the first preview of the new TMP SRP shaders which includes the URP & HDRP Lit and Unlit shaders.
These are still in development and will require a new version of the TMP package along with new version of Unity before they are fully functional and officially released.
Having said that, I have attached to this post a .UnityPackage containing these new shaders for you to play with and provide feedback as they are mostly functional even without custom material inspector.
I have also created the following video overview for these new shaders to outline some of their functionality.
Note: This first set of shaders requires the URP and / or HDRP packages version 10.4.0 for Unity 2020.2 / Unity 2020.3. I do plan to make these available for Unity 2019.4 as I get closer to releasing them.
These shaders will be included in future releases of the TMP package which are expected to be version 2.2.0-preview.x for Unity 2019.4 and version 3.2.0-preview.x for Unity 2020.3 or newer. New packages will include the custom material inspectors along with other necessary changes to make these shaders fully functional.
The shaders were designed in shader graph and editable.
P.S. Video is still being processed...
Any Update for 2019LTS?
2019.4 and 2019LTS are the same thing.
Hello! I was testing the preview shaders with TMP Version 3.0.6, and for some reason I can't get the Face texture working properly. It looks like the UVs the shaders expect are different than the ones TMP 3.0.6 provides. This was with the URP Lit version. If you need more info I will make a test scene and show the results.
Thanks for the great work!
As per my comments related to this in the video, texturing will not work until I release a preview of the new TMP package that includes the revised geometry layout. Currently, the texture UV coordinates are encoded in the X component of UV2 which are then decoded in the vertex shader. Since vertex shader operations are not supported by SRP, I have to move / revise the geometry layout to get around this limitation.
Just for reference:
Vector2 - UV0 (X, Y) are the UV coordinates of the glyph in the atlas texture
Vector2 - UV2 (X) contains the encoded (X, Y) UV coordinate of the Face and Outline texture.
UV2 (Y) contains the SDF scale.
In the next release
Vector4 - UV0 (X, Y) will remain the UV coordinates of the glyph in the atlas texture. (Z) will contain the texture array atlas index and (W) the SDF Scale.
Vector2 - UV2 (X, Y) the no longer encoded UV coordinates of the Face & Outline texture.
Seems like someone already did, here, go vote: https://issuetracker.unity3d.com/issues/textmeshpro-distance-field-overlay-shader-invisible-in-hdrp
See the following post above which includes a preview of the shaders along with video.
I saw it, it's very cool to see it working! The voting is just so that however manages and produces your area sees the issue, raises it's priority and gives you all the time in the world to take this beta and work it all the way up to production ready.
Stephan, I almost feel sorry for the "meh" response from the community here on this outstanding development: great work, and Thank you so much, and also for the excellent video!!! Will certainly replace my "x-mas project" with your shader (probably will strip them down for mobile use). Maybe you can take the silence from the community as sign that things are working very well: forums have a tendency to attract communication about issues and not communication about how well things work.
Thank you for the post and kind comments
All good on my end. Having been around the forum since 2011 or so, I certainly understand and appreciate that users are busy and most of the time only chime in to report potential issues.
In terms of these shaders, I expect that I will get more feedback once I release them with the new preview releases and custom material inspectors.
I had time to test the shader (both HDRP - Lit and HDRP - Unlit):
As you can see, it does work, the text does render above the cube (by putting the Depth Test on the material properties at Always), but it blinks every time you move the camera. After testing a bit when you hit play it stops for a bit, but any time an inspector is updated, it blinks even on play mode.
Any ideas how to fix it? Thanks!
Please be sure to test with the most recent version of HDRP. If the issue persists and given this type of behavior would not be specific to these shaders but to the HDRP system itself, I would recommend submitting a bug report with project so the HDRP team can easily reproduce this.
P.S. Once you have the Case #, please post it here and I will bring this to the attention of the HDRP team.
I'm on Unity 2020.3.9f1 with HDRP 10.5, which should work. I'll submit the bug report, in the meantime if you and everyone else reading this can also try doing this (since after all the entire purpose of this post and thus shader was having text render on top of everything) to see if the issue is consistent or it's something on our end (tbf we tried this on 2 different projects on 2 different PCs).
It has been approved to be reproducible. Here everyone, you can track and vote it here: https://issuetracker.unity3d.com/is...n-srp-slash-tmp-sdf-hdrp-lit-material-is-used
Any update for 2019.4? I really need these lit shaders for my project!
I can confirm that our issues with TMP in Unity were resolved by using the updated shaders compatible with HDRP in Unity 2021.1.7
I am grateful that Stephan had the time to look at this issue and for the work he does. I got the feeling that it was work done outside the normal remit of a daily work schedule, so thank you!
Is this still coming to 2019.4 LTS? Any idea when that might be?