|
@@ -44,6 +44,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
|
|
MaterialProperty _ThresholdEnd = null;
|
|
MaterialProperty _ThresholdEnd = null;
|
|
MaterialProperty _OutlineSmoothness = null;
|
|
MaterialProperty _OutlineSmoothness = null;
|
|
MaterialProperty _Use8Neighbourhood = null;
|
|
MaterialProperty _Use8Neighbourhood = null;
|
|
|
|
+ MaterialProperty _OutlineOpaqueAlpha = null;
|
|
MaterialProperty _OutlineMipLevel = null;
|
|
MaterialProperty _OutlineMipLevel = null;
|
|
MaterialProperty _StencilComp = null;
|
|
MaterialProperty _StencilComp = null;
|
|
MaterialProperty _StencilRef = null;
|
|
MaterialProperty _StencilRef = null;
|
|
@@ -55,6 +56,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
|
|
static GUIContent _ThresholdEndText = new GUIContent("Outline Threshold", "");
|
|
static GUIContent _ThresholdEndText = new GUIContent("Outline Threshold", "");
|
|
static GUIContent _OutlineSmoothnessText = new GUIContent("Outline Smoothness", "");
|
|
static GUIContent _OutlineSmoothnessText = new GUIContent("Outline Smoothness", "");
|
|
static GUIContent _Use8NeighbourhoodText = new GUIContent("Sample 8 Neighbours", "");
|
|
static GUIContent _Use8NeighbourhoodText = new GUIContent("Sample 8 Neighbours", "");
|
|
|
|
+ static GUIContent _OutlineOpaqueAlphaText = new GUIContent("Opaque Alpha", "If a pixel's alpha value is above this threshold it will not receive any outline color overlay. Use to exclude problematic semi-transparent areas.");
|
|
static GUIContent _OutlineMipLevelText = new GUIContent("Outline Mip Level", "");
|
|
static GUIContent _OutlineMipLevelText = new GUIContent("Outline Mip Level", "");
|
|
static GUIContent _StencilCompText = new GUIContent("Stencil Comparison", "");
|
|
static GUIContent _StencilCompText = new GUIContent("Stencil Comparison", "");
|
|
static GUIContent _StencilRefText = new GUIContent("Stencil Reference", "");
|
|
static GUIContent _StencilRefText = new GUIContent("Stencil Reference", "");
|
|
@@ -91,6 +93,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
|
|
_ThresholdEnd = FindProperty("_ThresholdEnd", props, false);
|
|
_ThresholdEnd = FindProperty("_ThresholdEnd", props, false);
|
|
_OutlineSmoothness = FindProperty("_OutlineSmoothness", props, false);
|
|
_OutlineSmoothness = FindProperty("_OutlineSmoothness", props, false);
|
|
_Use8Neighbourhood = FindProperty("_Use8Neighbourhood", props, false);
|
|
_Use8Neighbourhood = FindProperty("_Use8Neighbourhood", props, false);
|
|
|
|
+ _OutlineOpaqueAlpha = FindProperty("_OutlineOpaqueAlpha", props, false);
|
|
_OutlineMipLevel = FindProperty("_OutlineMipLevel", props, false);
|
|
_OutlineMipLevel = FindProperty("_OutlineMipLevel", props, false);
|
|
|
|
|
|
_StencilComp = FindProperty("_StencilComp", props, false);
|
|
_StencilComp = FindProperty("_StencilComp", props, false);
|
|
@@ -158,6 +161,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
|
|
_materialEditor.ShaderProperty(_ThresholdEnd, _ThresholdEndText);
|
|
_materialEditor.ShaderProperty(_ThresholdEnd, _ThresholdEndText);
|
|
_materialEditor.ShaderProperty(_OutlineSmoothness, _OutlineSmoothnessText);
|
|
_materialEditor.ShaderProperty(_OutlineSmoothness, _OutlineSmoothnessText);
|
|
_materialEditor.ShaderProperty(_Use8Neighbourhood, _Use8NeighbourhoodText);
|
|
_materialEditor.ShaderProperty(_Use8Neighbourhood, _Use8NeighbourhoodText);
|
|
|
|
+ _materialEditor.ShaderProperty(_OutlineOpaqueAlpha, _OutlineOpaqueAlphaText);
|
|
_materialEditor.ShaderProperty(_OutlineMipLevel, _OutlineMipLevelText);
|
|
_materialEditor.ShaderProperty(_OutlineMipLevel, _OutlineMipLevelText);
|
|
}
|
|
}
|
|
}
|
|
}
|