mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 17:18:44 +08:00
Merge branch '3.8' into 3.9-beta
This commit is contained in:
commit
4ef9af5b99
@ -347,6 +347,14 @@
|
||||
When exporting atlas textures from Spine with `Premultiply alpha` enabled (the default), you can leave it at `PMATexturePreset`. If you have disabled `Premultiply alpha`, set it to the included `StraightAlphaTexturePreset` asset. You can also create your own `TextureImporter` `Preset` asset and assign it here (include `PMA` or `Straight` in the name). In Unity versions before 2018.3 you can use `Texture2D` template assets instead of the newer `Preset` assets. Materials created for imported textures will also have the `Straight Alpha Texture` parameter configured accordingly.
|
||||
* All `Sprite` shaders (including URP and LWRP extension packages) now provide an additional `Fixed Normal Space` option `World-Space`. PReviously options were limited to `View-Space` and `Model-Space`.
|
||||
* `SkeletonGraphic` now fully supports [`SkeletonUtility`](http://esotericsoftware.com/spine-unity#SkeletonUtility) for generating a hierarchy of [`SkeletonUtilityBones`](http://esotericsoftware.com/spine-unity#SkeletonUtilityBone) in both modes `Follow` and `Override`. This also enables creating hinge chain physics rigs and using `SkeletonUtilityConstraints` such as `SkeletonUtilityGroundConstraint` and `SkeletonUtilityEyeConstraint` on `SkeletonGraphic`.
|
||||
* Added `OnMeshAndMaterialsUpdated` callback event to `SkeletonRenderer` and `SkeletonGraphic`. It is issued at the end of `LateUpdate`, before rendering.
|
||||
* Added `Skeleton-OutlineOnly` single pass shader to LWRP and URP extension modules. It can be assigned to materials as `Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly`. This allows for separate outline child *GameObjects* that reference the existing Mesh of their parent, and re-draw the mesh using this outline shader.
|
||||
* Added example component `RenderExistingMesh` to render a mesh again with different materials, as required by the new `Skeleton-OutlineOnly` shaders.
|
||||
In URP the outline has to be rendered via a separate GameObject as URP does not allow multiple render passes. To add an outline to your SkeletenRenderer:
|
||||
1) Add a child GameObject and move it a bit back (e.g. position Z = 0.01).
|
||||
2) Add a `RenderExistingMesh` component, provided in the `Spine Examples/Scripts/Sample Components` directory.
|
||||
3) Copy the original material, add *_Outline* to its name and set the shader to `Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly`.
|
||||
4) Assign this *_Outline* material at the `RenderExistingMesh` component under *Replacement Materials*.
|
||||
|
||||
* **Changes of default values**
|
||||
* `SkeletonMecanim`'s `Layer Mix Mode` now defaults to `MixMode.MixNext` instead of `MixMode.MixAlways`.
|
||||
|
||||
@ -0,0 +1,152 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated January 1, 2020. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2020, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#if UNITY_2018_3 || UNITY_2019 || UNITY_2018_3_OR_NEWER
|
||||
#define NEW_PREFAB_SYSTEM
|
||||
#endif
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Spine.Unity.Examples {
|
||||
|
||||
#if NEW_PREFAB_SYSTEM
|
||||
[ExecuteAlways]
|
||||
#else
|
||||
[ExecuteInEditMode]
|
||||
#endif
|
||||
[RequireComponent(typeof(MeshRenderer)), RequireComponent(typeof(MeshFilter))]
|
||||
public class RenderExistingMesh : MonoBehaviour
|
||||
{
|
||||
public MeshRenderer referenceRenderer;
|
||||
|
||||
bool updateViaSkeletonCallback = false;
|
||||
MeshFilter referenceMeshFilter;
|
||||
MeshRenderer ownRenderer;
|
||||
MeshFilter ownMeshFilter;
|
||||
|
||||
[System.Serializable]
|
||||
public struct MaterialReplacement {
|
||||
public Material originalMaterial;
|
||||
public Material replacementMaterial;
|
||||
}
|
||||
public MaterialReplacement[] replacementMaterials = new MaterialReplacement[0];
|
||||
|
||||
private Dictionary<Material, Material> replacementMaterialDict = new Dictionary<Material, Material>();
|
||||
private Material[] sharedMaterials = new Material[0];
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void Reset () {
|
||||
if (referenceRenderer == null) {
|
||||
referenceRenderer = this.transform.parent.GetComponentInParent<MeshRenderer>();
|
||||
if (!referenceRenderer)
|
||||
return;
|
||||
}
|
||||
|
||||
var parentMaterials = referenceRenderer.sharedMaterials;
|
||||
if (replacementMaterials.Length != parentMaterials.Length) {
|
||||
replacementMaterials = new MaterialReplacement[parentMaterials.Length];
|
||||
}
|
||||
for (int i = 0; i < parentMaterials.Length; ++i) {
|
||||
replacementMaterials[i].originalMaterial = parentMaterials[i];
|
||||
replacementMaterials[i].replacementMaterial = parentMaterials[i];
|
||||
}
|
||||
Awake();
|
||||
LateUpdate();
|
||||
}
|
||||
#endif
|
||||
|
||||
void Awake () {
|
||||
if (referenceRenderer == null) {
|
||||
referenceRenderer = this.transform.parent.GetComponentInParent<MeshRenderer>();
|
||||
}
|
||||
|
||||
// subscribe to OnMeshAndMaterialsUpdated
|
||||
var skeletonRenderer = referenceRenderer.GetComponent<SkeletonAnimation>();
|
||||
if (skeletonRenderer) {
|
||||
skeletonRenderer.OnMeshAndMaterialsUpdated -= UpdateOnCallback;
|
||||
skeletonRenderer.OnMeshAndMaterialsUpdated += UpdateOnCallback;
|
||||
updateViaSkeletonCallback = true;
|
||||
}
|
||||
referenceMeshFilter = referenceRenderer.GetComponent<MeshFilter>();
|
||||
ownRenderer = this.GetComponent<MeshRenderer>();
|
||||
ownMeshFilter = this.GetComponent<MeshFilter>();
|
||||
|
||||
InitializeDict();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private void Update () {
|
||||
if (!Application.isPlaying) {
|
||||
InitializeDict();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void LateUpdate () {
|
||||
#if UNITY_EDITOR
|
||||
if (!Application.isPlaying) {
|
||||
UpdateMaterials();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (updateViaSkeletonCallback)
|
||||
return;
|
||||
UpdateMaterials();
|
||||
}
|
||||
|
||||
void UpdateOnCallback (SkeletonRenderer r) {
|
||||
UpdateMaterials();
|
||||
}
|
||||
|
||||
void UpdateMaterials () {
|
||||
ownMeshFilter.sharedMesh = referenceMeshFilter.sharedMesh;
|
||||
|
||||
var parentMaterials = referenceRenderer.sharedMaterials;
|
||||
if (sharedMaterials.Length != parentMaterials.Length) {
|
||||
sharedMaterials = new Material[parentMaterials.Length];
|
||||
}
|
||||
for (int i = 0; i < parentMaterials.Length; ++i) {
|
||||
var parentMaterial = parentMaterials[i];
|
||||
if (replacementMaterialDict.ContainsKey(parentMaterial)) {
|
||||
sharedMaterials[i] = replacementMaterialDict[parentMaterial];
|
||||
}
|
||||
}
|
||||
ownRenderer.sharedMaterials = sharedMaterials;
|
||||
}
|
||||
|
||||
void InitializeDict () {
|
||||
for (int i = 0; i < replacementMaterials.Length; ++i) {
|
||||
var entry = replacementMaterials[i];
|
||||
replacementMaterialDict[entry.originalMaterial] = entry.replacementMaterial;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bbb58643468d3dc479e20aff7c8c611e
|
||||
timeCreated: 1585240369
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -65,6 +65,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
|
||||
|
||||
protected const string ShaderOutlineNamePrefix = "Spine/Outline/";
|
||||
protected const string ShaderNormalNamePrefix = "Spine/";
|
||||
protected const string ShaderWithoutStandardVariantSuffix = "OutlineOnly";
|
||||
|
||||
#region ShaderGUI
|
||||
|
||||
@ -123,20 +124,30 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
|
||||
EditorGUIUtility.labelWidth = 0f;
|
||||
|
||||
bool mixedValue;
|
||||
bool isOutlineEnabled = IsOutlineEnabled(_materialEditor, out mixedValue);
|
||||
EditorGUI.showMixedValue = mixedValue;
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool hasOutlineVariant = !IsShaderWithoutStandardVariantShader(_materialEditor, out mixedValue);
|
||||
bool isOutlineEnabled = true;
|
||||
if (hasOutlineVariant) {
|
||||
isOutlineEnabled = IsOutlineEnabled(_materialEditor, out mixedValue);
|
||||
EditorGUI.showMixedValue = mixedValue;
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
var origFontStyle = EditorStyles.label.fontStyle;
|
||||
EditorStyles.label.fontStyle = FontStyle.Bold;
|
||||
isOutlineEnabled = EditorGUILayout.Toggle(_EnableOutlineText, isOutlineEnabled);
|
||||
EditorStyles.label.fontStyle = origFontStyle;
|
||||
EditorGUI.showMixedValue = false;
|
||||
if (EditorGUI.EndChangeCheck()) {
|
||||
foreach (Material material in _materialEditor.targets) {
|
||||
SwitchShaderToOutlineSettings(material, isOutlineEnabled);
|
||||
var origFontStyle = EditorStyles.label.fontStyle;
|
||||
EditorStyles.label.fontStyle = FontStyle.Bold;
|
||||
isOutlineEnabled = EditorGUILayout.Toggle(_EnableOutlineText, isOutlineEnabled);
|
||||
EditorStyles.label.fontStyle = origFontStyle;
|
||||
EditorGUI.showMixedValue = false;
|
||||
if (EditorGUI.EndChangeCheck()) {
|
||||
foreach (Material material in _materialEditor.targets) {
|
||||
SwitchShaderToOutlineSettings(material, isOutlineEnabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
var origFontStyle = EditorStyles.label.fontStyle;
|
||||
EditorStyles.label.fontStyle = FontStyle.Bold;
|
||||
EditorGUILayout.LabelField(_EnableOutlineText);
|
||||
EditorStyles.label.fontStyle = origFontStyle;
|
||||
}
|
||||
|
||||
if (isOutlineEnabled) {
|
||||
_materialEditor.ShaderProperty(_OutlineWidth, _OutlineWidthText);
|
||||
@ -162,7 +173,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
|
||||
void SwitchShaderToOutlineSettings (Material material, bool enableOutline) {
|
||||
|
||||
var shaderName = material.shader.name;
|
||||
bool isSetToOutlineShader = shaderName.StartsWith(ShaderOutlineNamePrefix);
|
||||
bool isSetToOutlineShader = shaderName.Contains(ShaderOutlineNamePrefix);
|
||||
if (isSetToOutlineShader && !enableOutline) {
|
||||
shaderName = shaderName.Replace(ShaderOutlineNamePrefix, ShaderNormalNamePrefix);
|
||||
_materialEditor.SetShader(Shader.Find(shaderName), false);
|
||||
@ -179,7 +190,7 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
|
||||
mixedValue = false;
|
||||
bool isAnyEnabled = false;
|
||||
foreach (Material material in editor.targets) {
|
||||
if (material.shader.name.StartsWith(ShaderOutlineNamePrefix)) {
|
||||
if (material.shader.name.Contains(ShaderOutlineNamePrefix)) {
|
||||
isAnyEnabled = true;
|
||||
}
|
||||
else if (isAnyEnabled) {
|
||||
@ -189,6 +200,20 @@ public class SpineShaderWithOutlineGUI : ShaderGUI {
|
||||
return isAnyEnabled;
|
||||
}
|
||||
|
||||
static bool IsShaderWithoutStandardVariantShader (MaterialEditor editor, out bool mixedValue) {
|
||||
mixedValue = false;
|
||||
bool isAnyShaderWithoutVariant = false;
|
||||
foreach (Material material in editor.targets) {
|
||||
if (material.shader.name.Contains(ShaderWithoutStandardVariantSuffix)) {
|
||||
isAnyShaderWithoutVariant = true;
|
||||
}
|
||||
else if (isAnyShaderWithoutVariant) {
|
||||
mixedValue = true;
|
||||
}
|
||||
}
|
||||
return isAnyShaderWithoutVariant;
|
||||
}
|
||||
|
||||
static bool BoldToggleField (GUIContent label, bool value) {
|
||||
FontStyle origFontStyle = EditorStyles.label.fontStyle;
|
||||
EditorStyles.label.fontStyle = FontStyle.Bold;
|
||||
|
||||
@ -236,6 +236,10 @@ namespace Spine.Unity {
|
||||
/// <summary>OnRebuild is raised after the Skeleton is successfully initialized.</summary>
|
||||
public event SkeletonRendererDelegate OnRebuild;
|
||||
|
||||
/// <summary>OnMeshAndMaterialsUpdated is at the end of LateUpdate after the Mesh and
|
||||
/// all materials have been updated.</summary>
|
||||
public event SkeletonRendererDelegate OnMeshAndMaterialsUpdated;
|
||||
|
||||
protected Spine.AnimationState state;
|
||||
public Spine.AnimationState AnimationState { get { return state; } }
|
||||
|
||||
@ -370,6 +374,8 @@ namespace Spine.Unity {
|
||||
}
|
||||
|
||||
//this.UpdateMaterial(); // TODO: This allocates memory.
|
||||
if (OnMeshAndMaterialsUpdated != null)
|
||||
OnMeshAndMaterialsUpdated(this);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@ -226,6 +226,10 @@ namespace Spine.Unity {
|
||||
/// <summary>OnRebuild is raised after the Skeleton is successfully initialized.</summary>
|
||||
public event SkeletonRendererDelegate OnRebuild;
|
||||
|
||||
/// <summary>OnMeshAndMaterialsUpdated is at the end of LateUpdate after the Mesh and
|
||||
/// all materials have been updated.</summary>
|
||||
public event SkeletonRendererDelegate OnMeshAndMaterialsUpdated;
|
||||
|
||||
public SkeletonDataAsset SkeletonDataAsset { get { return skeletonDataAsset; } } // ISkeletonComponent
|
||||
|
||||
#region Runtime Instantiation
|
||||
@ -468,6 +472,9 @@ namespace Spine.Unity {
|
||||
SetMaterialSettingsToFixDrawOrder();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (OnMeshAndMaterialsUpdated != null)
|
||||
OnMeshAndMaterialsUpdated(this);
|
||||
}
|
||||
|
||||
public void FindAndApplySeparatorSlots (string startsWith, bool clearExistingSeparators = true, bool updateStringArray = false) {
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d122262772fd0ec47887efc848e8d285
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,37 @@
|
||||
Shader "Lightweight Render Pipeline/Spine/Outline/Skeleton-OutlineOnly" {
|
||||
Properties {
|
||||
[NoScaleOffset] _MainTex("Main Texture", 2D) = "black" {}
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default
|
||||
|
||||
// Outline properties are drawn via custom editor.
|
||||
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
|
||||
[HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1)
|
||||
[HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024
|
||||
[HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25
|
||||
[HideInInspector] _OutlineSmoothness("Outline Smoothness", Range(0,1)) = 1.0
|
||||
[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood("Sample 8 Neighbours", Float) = 1
|
||||
[HideInInspector] _OutlineMipLevel("Outline Mip Level", Range(0,3)) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
// Lightweight Pipeline tag is required. If Lightweight render pipeline is not set in the graphics settings
|
||||
// this Subshader will fail.
|
||||
Tags { "RenderPipeline" = "LightweightPipeline" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
LOD 100
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
UsePass "Spine/Outline/Skeleton/OUTLINE"
|
||||
}
|
||||
|
||||
FallBack "Hidden/InternalErrorShader"
|
||||
CustomEditor "SpineShaderWithOutlineGUI"
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e07d39bf1c784604e9420722eb804edf
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,42 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: raptor-pma_Material_Outline
|
||||
m_Shader: {fileID: 4800000, guid: 0c26b8f3f8867ba41ac82baf19d8ff91, type: 3}
|
||||
m_ShaderKeywords: _USE8NEIGHBOURHOOD_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 6c8d8b7e5bcbeb64b84f7a4d23de94dc, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskTex:
|
||||
m_Texture: {fileID: 2800000, guid: 4a7cf7f7c7f74664f8514d290b5f4dd1, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _Cutoff: 0.1
|
||||
- _OutlineMipLevel: 0
|
||||
- _OutlineReferenceTexWidth: 1024
|
||||
- _OutlineSmoothness: 1
|
||||
- _OutlineWidth: 1.77
|
||||
- _StencilComp: 8
|
||||
- _StencilRef: 1
|
||||
- _StraightAlphaInput: 0
|
||||
- _ThresholdEnd: 0.25
|
||||
- _Use8Neighbourhood: 1
|
||||
m_Colors:
|
||||
- _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48fccf41ebe7c7e4e80e2698562616c8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,92 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: stretchyman-diffuse-pma_Material_Outline
|
||||
m_Shader: {fileID: 4800000, guid: 0c26b8f3f8867ba41ac82baf19d8ff91, type: 3}
|
||||
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _NORMALMAP _RECEIVE_SHADOWS_OFF _USE8NEIGHBOURHOOD_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
AlphaDepth: true
|
||||
IGNOREPROJECTOR: true
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _AlphaTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BlendTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: 0d1cf8a59ac52394084f22b49e53548e, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DiffuseRamp:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: c9255abfa116ced46ad8d46908663d9f, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskTex:
|
||||
m_Texture: {fileID: 2800000, guid: b61a8e1e7baba4d47b417e8b7cc852e0, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- PixelSnap: 0
|
||||
- _BlendAmount: 0
|
||||
- _Brightness: 1
|
||||
- _BumpScale: 1
|
||||
- _Cull: 0
|
||||
- _CustomRenderQueue: 0
|
||||
- _Cutoff: 0.1
|
||||
- _DstBlend: 10
|
||||
- _EmissionPower: 2
|
||||
- _EnableExternalAlpha: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _Hue: 0
|
||||
- _Metallic: 0
|
||||
- _OutlineMipLevel: 0
|
||||
- _OutlineReferenceTexWidth: 1024
|
||||
- _OutlineSmoothness: 1
|
||||
- _OutlineWidth: 3
|
||||
- _RenderQueue: 0
|
||||
- _RimPower: 2
|
||||
- _Saturation: 1
|
||||
- _ShadowAlphaCutoff: 0.1
|
||||
- _SrcBlend: 1
|
||||
- _StencilComp: 8
|
||||
- _StencilRef: 1
|
||||
- _StraightAlphaInput: 0
|
||||
- _ThresholdEnd: 0.25
|
||||
- _Use8Neighbourhood: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _FixedNormal: {r: 0, g: 0, b: 1, a: 1}
|
||||
- _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
|
||||
- _OverlayColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _RimColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c556bf10e5e5267429938469800c7c31
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58780ae2288084f459cd0023810d0b88
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 958b6dbd07d10374189a5c45cd641149
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,37 @@
|
||||
Shader "Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly" {
|
||||
Properties {
|
||||
[NoScaleOffset] _MainTex("Main Texture", 2D) = "black" {}
|
||||
[HideInInspector] _StencilRef("Stencil Reference", Float) = 1.0
|
||||
[Enum(UnityEngine.Rendering.CompareFunction)] _StencilComp("Stencil Comparison", Float) = 8 // Set to Always as default
|
||||
|
||||
// Outline properties are drawn via custom editor.
|
||||
[HideInInspector] _OutlineWidth("Outline Width", Range(0,8)) = 3.0
|
||||
[HideInInspector] _OutlineColor("Outline Color", Color) = (1,1,0,1)
|
||||
[HideInInspector] _OutlineReferenceTexWidth("Reference Texture Width", Int) = 1024
|
||||
[HideInInspector] _ThresholdEnd("Outline Threshold", Range(0,1)) = 0.25
|
||||
[HideInInspector] _OutlineSmoothness("Outline Smoothness", Range(0,1)) = 1.0
|
||||
[HideInInspector][MaterialToggle(_USE8NEIGHBOURHOOD_ON)] _Use8Neighbourhood("Sample 8 Neighbours", Float) = 1
|
||||
[HideInInspector] _OutlineMipLevel("Outline Mip Level", Range(0,3)) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
// Universal Pipeline tag is required. If Universal render pipeline is not set in the graphics settings
|
||||
// this Subshader will fail.
|
||||
Tags { "RenderPipeline" = "UniversalPipeline" "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
|
||||
LOD 100
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
Stencil {
|
||||
Ref[_StencilRef]
|
||||
Comp[_StencilComp]
|
||||
Pass Keep
|
||||
}
|
||||
|
||||
UsePass "Spine/Outline/Skeleton/OUTLINE"
|
||||
}
|
||||
|
||||
FallBack "Hidden/InternalErrorShader"
|
||||
CustomEditor "SpineShaderWithOutlineGUI"
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c26b8f3f8867ba41ac82baf19d8ff91
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
x
Reference in New Issue
Block a user