-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [2.1.0-preview.5] - 2020-02-25
- Loading branch information
Unity Technologies
committed
Feb 24, 2020
1 parent
fb37e3f
commit 63fe883
Showing
22 changed files
with
1,975 additions
and
1,005 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// Simplified SDF shader: | ||
// - No Shading Option (bevel / bump / env map) | ||
// - No Glow Option | ||
// - Softness is applied on both side of the outline | ||
|
||
Shader "Hidden/TMP/Internal/Editor/Distance Field SSD" { | ||
|
||
Properties{ | ||
_FaceColor("Face Color", Color) = (1,1,1,1) | ||
_FaceDilate("Face Dilate", Range(-1,1)) = 0 | ||
|
||
_OutlineColor("Outline Color", Color) = (0,0,0,1) | ||
_OutlineWidth("Outline Thickness", Range(0,1)) = 0 | ||
_OutlineSoftness("Outline Softness", Range(0,1)) = 0 | ||
|
||
_UnderlayColor("Border Color", Color) = (0,0,0,.5) | ||
_UnderlayOffsetX("Border OffsetX", Range(-1,1)) = 0 | ||
_UnderlayOffsetY("Border OffsetY", Range(-1,1)) = 0 | ||
_UnderlayDilate("Border Dilate", Range(-1,1)) = 0 | ||
_UnderlaySoftness("Border Softness", Range(0,1)) = 0 | ||
|
||
_WeightNormal("Weight Normal", float) = 0 | ||
_WeightBold("Weight Bold", float) = .5 | ||
|
||
_ShaderFlags("Flags", float) = 0 | ||
_ScaleRatioA("Scale RatioA", float) = 1 | ||
_ScaleRatioB("Scale RatioB", float) = 1 | ||
_ScaleRatioC("Scale RatioC", float) = 1 | ||
|
||
_MainTex("Font Atlas", 2D) = "white" {} | ||
_TextureWidth("Texture Width", float) = 1024 | ||
_TextureHeight("Texture Height", float) = 1024 | ||
_GradientScale("Gradient Scale", float) = 1 | ||
_ScaleX("Scale X", float) = 1 | ||
_ScaleY("Scale Y", float) = 1 | ||
_PerspectiveFilter("Perspective Correction", Range(0, 1)) = 0.875 | ||
_Sharpness("Sharpness", Range(-1,1)) = 0 | ||
|
||
_VertexOffsetX("Vertex OffsetX", float) = 0 | ||
_VertexOffsetY("Vertex OffsetY", float) = 0 | ||
} | ||
|
||
SubShader | ||
{ | ||
Tags | ||
{ | ||
"ForceSupported" = "True" | ||
} | ||
|
||
Lighting Off | ||
Blend One OneMinusSrcAlpha | ||
Cull Off | ||
ZWrite Off | ||
ZTest Always | ||
|
||
Pass | ||
{ | ||
CGPROGRAM | ||
#pragma vertex VertShader | ||
#pragma fragment PixShader | ||
#pragma shader_feature __ OUTLINE_ON | ||
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER | ||
|
||
#include "UnityCG.cginc" | ||
#include "UnityUI.cginc" | ||
#include "TMP_Properties.cginc" | ||
|
||
#include "TMP_SDF_SSD.cginc" | ||
|
||
ENDCG | ||
} | ||
} | ||
|
||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" | ||
} |
2 changes: 1 addition & 1 deletion
2
.../Shaders/TMP_SDF Internal SSD.shader.meta → ...aders/TMP_SDF Internal Editor.shader.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.