Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Outline shader not working in URP

A topic by AdrienVR created May 14, 2020 Views: 1,757 Replies: 14
Viewing posts 1 to 13

Hello,

We are using SuperTextMesh on our project but the Outline shader (Super Text Mesh/UI/Outline) doesn't seem to work when using the Universal Render Pipeline. I guess it is because only 1 pass is rendered.
Do you have a solution to make it run all the shader passes?

Thanks

Developer

Hi!


URP doesn't support multi-pass shaders (for whatever reason...), but a single-pass outline shader for STM is presently in the works!

Awesome! Can't wait :)

(1 edit)

Hello, any news on this subject?
I noticed it seems to work already for some texts, but not all, this one is ok:  , this one shows artifacts:
However it seems that it doesn't work at all in the scene view.

Developer

There's been a bit of progress! Here's a low-quality soft shadow, showing off no z-fighting and no blur over top of letters in the single-pass shader! The shader has code that expands the size within the verts without altering the text UV coords to allow room for shadows and it's honestly really crazy that this is even possible.



Progress got halted again because the unity asset store caused me some problems a few weeks back, I wasn't even sure if I'd be able to give customers asset updates anymore so it was a bit demotivational. Hopefully we'll get back to work on the shaders soon! (It's actually my shader friend's birthday today so... maybe not immediately haha)


Also, I thought it was 100% broken, but as it turns out that Super Text Mesh used with Unity UI should still support the current outline/dropshadow shaders. A friend was using it in a URP game the other day with a screen-space canvas, but I'm curious if it'll work with a world-space canvas, too. Try giving that a shot!

This looks incredible!

Happy birthday to your shader friend!
We will wait a bit more then. I'll let you know if I test a world-space canvas.

Hi,

Actually we still have the issue because we are rendering the Canvas using a URP camera (render mode of our canvas is Screen Space - Camera). So it would be perfect for us to have this single pass shader. Do you think it will be available soon, or should we find another solution?

Cheers!

Developer

Hello, unfortunately still no updates. I've been trying to make time with my shader friend but it's proving difficult. I just thought up a really silly idea I could write for you as a quick fix to emulate the old outline shader if you need it ASAP. Let me know if you're interested,  I've been fixing a bug today but could shift gears and give this idea a shot.

(1 edit)

Sure I'm interested. You can contact me at:

Hello, 

I have just run into this same problem after switching over to URP and was wondering if the single pass shader has been finished or if a suitable workaround has been found. I use the outline shader on virtually all the text in my game so it's a pretty significant issue for me atm.

Thanks

Hi, it actually doesn't work only in scene view, should be fine in the game view when the game is running.

Developer

Ah, it does, Adrien?? That's really good to hear. 


Kev, I made this temporary script to emulate the effect if that solution doesn't work. https://pastebin.com/ixxVjtCH If you attach this to a UI STM object it shooould do it's thing. (I can write the non-UI code if you need it, I just didn't have the time when I wrote this!)


Unfortunately, the outline script I was working on with my friend hit a ton of snags and we have to rethink the whole process. I had an idea, but I can't really give a timeframe on delivery, sorry. Real life and new positions have been starting to get in the way of STM's development.

Unfortunately it doesn't seem to work for me even in play mode. That temporary script works well enough though. I think with a combination of non-camera canvases and the script I should be able to manage. 

A non-UI version of the script would also be very helpful if you find the time!

Developer

https://pastebin.com/ixxVjtCH


I've updated the script to function with non-UI text!

Fantastic, thank you!