Create PixelArtFont_Outline.shader#3
Open
Saishy wants to merge 2 commits intoAlexanderOcias:masterfrom
Saishy:master
Open
Create PixelArtFont_Outline.shader#3Saishy wants to merge 2 commits intoAlexanderOcias:masterfrom Saishy:master
Saishy wants to merge 2 commits intoAlexanderOcias:masterfrom
Saishy:master
Conversation
Added a new shader that adds pixel perfect outlines to fonts.
Owner
|
Shader appears to have no effect on my end here, got a usage example? |
Author
|
Hi, sorry they only seem to work with textmeshes (not pro)?
https://twitter.com/SaishyKitty/status/988465935945207810
You would basically do something like:
```csharp
_renderer.GetPropertyBlock(matPropBlock);
matPropBlock.SetFloat("_Outline", 1);
matPropBlock.SetColor("_OutlineColor", outColor);
_renderer.SetPropertyBlock(matPropBlock);
```
I made and sent this before finding out textmeshes don't work correctly with this system :c
…On Mon, Apr 23, 2018 at 10:09 PM, AlexanderOcias ***@***.***> wrote:
Shader appears to have no effect on my end here, got a usage example?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB6zzB4e5_GunO9Q4ULR30HTfSsZoQ0jks5trntBgaJpZM4TgVlj>
.
|
This shader was created because UI elements don't accept materialpropertyblocks. So you can directly change the outline on the inspector.
Author
|
Ok seeing how the TextMeshes (Not pro) now work correctly after doing ((1 / PPU) * 10) this shader is relevant again. I've also added a new one that allows you to change the Outline properties from the inspector, because UI elements don't accept MaterialPropertyBlocks, so Canvas Texts can now have outlines and batching. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a new shader that adds pixel perfect outlines to fonts.