Skip to main content

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

Shadow thickness parameter?

A topic by GalaxyTrail created Mar 13, 2021 Views: 348 Replies: 6
Viewing posts 1 to 7

I've been using Super Text Mesh in our project for a few years now, really enjoying its versatility! I'm using the dropshadow + outline shader for my text, and I've noticed that the outline does not cast a shadow, nor is there an option to made the drop shadow thicker to match. Could this potentially be added as a feature in a future version of the shader?

Developer

Hey!


I never added this because I figured that in practice the difference was so small, no one would notice, despite requiring additional  passes in the shader...

If you still want, I can give you a modified version of the shaders to test out! I'd go ahead an implement it, but I'm worried about performance from the additional passes.

That would be wonderful, thank you! I can let you know if there's a performance hit on my end. Worst case scenario, I can add a script to duplicate the text underneath as a shadow during runtime.

Developer

Actually, before I do this I just remembered that the shaders have a variable named "ShadowCutoff" that could potentially be raised/lowered to maybe give the desired effect. It shouldn't change the shadow thickness too much, but it could be enough to match up to the outline?

I just tried changing this value and it seems to have no effect. I also tried changing the line in STMCustomInspectorTools that forces it to always be 0.5f to something else, but still no change.

Developer

Hey! Uh, got a bit of bad news, I can't seem to get multiple shadows to render from one shader, with the way STM's shaders are currently configured. (I really want to do a total rebuild, sometime, but haven't had the time...) For that issue, having a script like you mentioned to dupe the STM object is probably best if shadows are that important! Really sorry about that, I'm trying to research it and one shadow cast might just be the limit on a shader?

No problem, I appreciate you looking into this!

I've attached a script to each STM object in my scene that renders a duplicate on top of it and changes the original into a specified shadow color, and that does the trick.