mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-08 11:46:53 +08:00
[unity] Added missing Fixed Normal Space option World-Space to all Sprite shaders (including URP and LWRP packages). Closes #1638.
This commit is contained in:
parent
daa2a76b3a
commit
919b7badcb
@ -216,6 +216,7 @@
|
|||||||
* **Example:** You can find an example scene in the package under `com.esotericsoftware.spine.urp-shaders-3.8/Examples/URP Shaders.unity` that demonstrates usage of the URP shaders.
|
* **Example:** You can find an example scene in the package under `com.esotericsoftware.spine.urp-shaders-3.8/Examples/URP Shaders.unity` that demonstrates usage of the URP shaders.
|
||||||
* Spine Preferences now provide an **`Atlas Texture Settings`** parameter for applying customizable texture import settings at all newly imported Spine atlas textures.
|
* Spine Preferences now provide an **`Atlas Texture Settings`** parameter for applying customizable texture import settings at all newly imported Spine atlas textures.
|
||||||
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.
|
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`.
|
||||||
|
|
||||||
* **Changes of default values**
|
* **Changes of default values**
|
||||||
* `SkeletonMecanim`'s `Layer Mix Mode` now defaults to `MixMode.MixNext` instead of `MixMode.MixAlways`.
|
* `SkeletonMecanim`'s `Layer Mix Mode` now defaults to `MixMode.MixNext` instead of `MixMode.MixAlways`.
|
||||||
|
|||||||
@ -78,6 +78,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
|
|||||||
MeshNormals = -1,
|
MeshNormals = -1,
|
||||||
FixedNormalsViewSpace = 0,
|
FixedNormalsViewSpace = 0,
|
||||||
FixedNormalsModelSpace = 1,
|
FixedNormalsModelSpace = 1,
|
||||||
|
FixedNormalsWorldSpace = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
MaterialProperty _mainTexture = null;
|
MaterialProperty _mainTexture = null;
|
||||||
@ -162,7 +163,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
|
|||||||
static GUIContent _pixelSnapText = new GUIContent("Pixel Snap");
|
static GUIContent _pixelSnapText = new GUIContent("Pixel Snap");
|
||||||
//static GUIContent _customRenderTypetagsText = new GUIContent("Use Custom RenderType tags");
|
//static GUIContent _customRenderTypetagsText = new GUIContent("Use Custom RenderType tags");
|
||||||
static GUIContent _fixedNormalSpaceText = new GUIContent("Fixed Normal Space");
|
static GUIContent _fixedNormalSpaceText = new GUIContent("Fixed Normal Space");
|
||||||
static GUIContent[] _fixedNormalSpaceOptions = { new GUIContent("View-Space"), new GUIContent("Model-Space") };
|
static GUIContent[] _fixedNormalSpaceOptions = { new GUIContent("View-Space"), new GUIContent("Model-Space"), new GUIContent("World-Space") };
|
||||||
static GUIContent _rimLightingToggleText = new GUIContent("Rim Lighting", "Enable Rim Lighting.");
|
static GUIContent _rimLightingToggleText = new GUIContent("Rim Lighting", "Enable Rim Lighting.");
|
||||||
static GUIContent _rimColorText = new GUIContent("Rim Color");
|
static GUIContent _rimColorText = new GUIContent("Rim Color");
|
||||||
static GUIContent _rimPowerText = new GUIContent("Rim Power");
|
static GUIContent _rimPowerText = new GUIContent("Rim Power");
|
||||||
@ -1084,6 +1085,8 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
|
|||||||
static eNormalsMode GetMaterialNormalsMode (Material material) {
|
static eNormalsMode GetMaterialNormalsMode (Material material) {
|
||||||
if (material.IsKeywordEnabled("_FIXED_NORMALS_VIEWSPACE") || material.IsKeywordEnabled("_FIXED_NORMALS_VIEWSPACE_BACKFACE"))
|
if (material.IsKeywordEnabled("_FIXED_NORMALS_VIEWSPACE") || material.IsKeywordEnabled("_FIXED_NORMALS_VIEWSPACE_BACKFACE"))
|
||||||
return eNormalsMode.FixedNormalsViewSpace;
|
return eNormalsMode.FixedNormalsViewSpace;
|
||||||
|
if (material.IsKeywordEnabled("_FIXED_NORMALS_WORLDSPACE"))
|
||||||
|
return eNormalsMode.FixedNormalsWorldSpace;
|
||||||
if (material.IsKeywordEnabled("_FIXED_NORMALS_MODELSPACE") || material.IsKeywordEnabled("_FIXED_NORMALS_MODELSPACE_BACKFACE"))
|
if (material.IsKeywordEnabled("_FIXED_NORMALS_MODELSPACE") || material.IsKeywordEnabled("_FIXED_NORMALS_MODELSPACE_BACKFACE"))
|
||||||
return eNormalsMode.FixedNormalsModelSpace;
|
return eNormalsMode.FixedNormalsModelSpace;
|
||||||
|
|
||||||
@ -1101,6 +1104,7 @@ public class SpineSpriteShaderGUI : SpineShaderWithOutlineGUI {
|
|||||||
static void SetNormalsMode (Material material, eNormalsMode normalsMode, bool allowBackFaceRendering) {
|
static void SetNormalsMode (Material material, eNormalsMode normalsMode, bool allowBackFaceRendering) {
|
||||||
SetKeyword(material, "_FIXED_NORMALS_VIEWSPACE", normalsMode == eNormalsMode.FixedNormalsViewSpace && !allowBackFaceRendering);
|
SetKeyword(material, "_FIXED_NORMALS_VIEWSPACE", normalsMode == eNormalsMode.FixedNormalsViewSpace && !allowBackFaceRendering);
|
||||||
SetKeyword(material, "_FIXED_NORMALS_VIEWSPACE_BACKFACE", normalsMode == eNormalsMode.FixedNormalsViewSpace && allowBackFaceRendering);
|
SetKeyword(material, "_FIXED_NORMALS_VIEWSPACE_BACKFACE", normalsMode == eNormalsMode.FixedNormalsViewSpace && allowBackFaceRendering);
|
||||||
|
SetKeyword(material, "_FIXED_NORMALS_WORLDSPACE", normalsMode == eNormalsMode.FixedNormalsWorldSpace);
|
||||||
SetKeyword(material, "_FIXED_NORMALS_MODELSPACE", normalsMode == eNormalsMode.FixedNormalsModelSpace && !allowBackFaceRendering);
|
SetKeyword(material, "_FIXED_NORMALS_MODELSPACE", normalsMode == eNormalsMode.FixedNormalsModelSpace && !allowBackFaceRendering);
|
||||||
SetKeyword(material, "_FIXED_NORMALS_MODELSPACE_BACKFACE", normalsMode == eNormalsMode.FixedNormalsModelSpace && allowBackFaceRendering);
|
SetKeyword(material, "_FIXED_NORMALS_MODELSPACE_BACKFACE", normalsMode == eNormalsMode.FixedNormalsModelSpace && allowBackFaceRendering);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#define SPRITE_LIGHTING_INCLUDED
|
#define SPRITE_LIGHTING_INCLUDED
|
||||||
|
|
||||||
//Check for using mesh normals
|
//Check for using mesh normals
|
||||||
#if !defined(_FIXED_NORMALS_VIEWSPACE) && !defined(_FIXED_NORMALS_VIEWSPACE_BACKFACE) && !defined(_FIXED_NORMALS_MODELSPACE) && !defined(_FIXED_NORMALS_MODELSPACE_BACKFACE)
|
#if !defined(_FIXED_NORMALS_VIEWSPACE) && !defined(_FIXED_NORMALS_VIEWSPACE_BACKFACE) && !defined(_FIXED_NORMALS_MODELSPACE) && !defined(_FIXED_NORMALS_MODELSPACE_BACKFACE) && !defined(_FIXED_NORMALS_WORLDSPACE)
|
||||||
#define MESH_NORMALS
|
#define MESH_NORMALS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -53,9 +53,9 @@ inline float calculateBackfacingSign(float3 worldPos)
|
|||||||
inline half3 calculateSpriteWorldNormal(VertexInput vertex, float backFaceSign)
|
inline half3 calculateSpriteWorldNormal(VertexInput vertex, float backFaceSign)
|
||||||
{
|
{
|
||||||
#if defined(MESH_NORMALS)
|
#if defined(MESH_NORMALS)
|
||||||
|
|
||||||
return calculateWorldNormal(vertex.normal);
|
return calculateWorldNormal(vertex.normal);
|
||||||
|
|
||||||
#else // !MESH_NORMALS
|
#else // !MESH_NORMALS
|
||||||
|
|
||||||
float3 normal = getFixedNormal();
|
float3 normal = getFixedNormal();
|
||||||
@ -65,24 +65,27 @@ inline half3 calculateSpriteWorldNormal(VertexInput vertex, float backFaceSign)
|
|||||||
//Rotate fixed normal by inverse view matrix to convert the fixed normal into world space
|
//Rotate fixed normal by inverse view matrix to convert the fixed normal into world space
|
||||||
float3x3 invView = transpose((float3x3)UNITY_MATRIX_V);
|
float3x3 invView = transpose((float3x3)UNITY_MATRIX_V);
|
||||||
return normalize(mul(invView, normal));
|
return normalize(mul(invView, normal));
|
||||||
|
#elif defined (_FIXED_NORMALS_WORLDSPACE)
|
||||||
|
//World space fixed normal
|
||||||
|
return normal;
|
||||||
#else
|
#else
|
||||||
//Model space fixed normal.
|
//Model space fixed normal.
|
||||||
#if defined(FIXED_NORMALS_BACKFACE_RENDERING)
|
#if defined(FIXED_NORMALS_BACKFACE_RENDERING)
|
||||||
//If back face rendering is enabled and the sprite is facing away from the camera (ie we're rendering the backface) then need to flip the normal
|
//If back face rendering is enabled and the sprite is facing away from the camera (ie we're rendering the backface) then need to flip the normal
|
||||||
normal *= backFaceSign;
|
normal *= backFaceSign;
|
||||||
#endif
|
#endif
|
||||||
return calculateWorldNormal(normal);
|
return calculateWorldNormal(normal);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // !MESH_NORMALS
|
#endif // !MESH_NORMALS
|
||||||
}
|
}
|
||||||
|
|
||||||
inline half3 calculateSpriteViewNormal(VertexInput vertex, float backFaceSign)
|
inline half3 calculateSpriteViewNormal(VertexInput vertex, float backFaceSign)
|
||||||
{
|
{
|
||||||
#if defined(MESH_NORMALS)
|
#if defined(MESH_NORMALS)
|
||||||
|
|
||||||
return normalize(mul((float3x3)UNITY_MATRIX_IT_MV, vertex.normal));
|
return normalize(mul((float3x3)UNITY_MATRIX_IT_MV, vertex.normal));
|
||||||
|
|
||||||
#else // !MESH_NORMALS
|
#else // !MESH_NORMALS
|
||||||
|
|
||||||
float3 normal = getFixedNormal();
|
float3 normal = getFixedNormal();
|
||||||
@ -90,15 +93,18 @@ inline half3 calculateSpriteViewNormal(VertexInput vertex, float backFaceSign)
|
|||||||
#if defined(_FIXED_NORMALS_VIEWSPACE) || defined(_FIXED_NORMALS_VIEWSPACE_BACKFACE)
|
#if defined(_FIXED_NORMALS_VIEWSPACE) || defined(_FIXED_NORMALS_VIEWSPACE_BACKFACE)
|
||||||
//View space fixed normal
|
//View space fixed normal
|
||||||
return normal;
|
return normal;
|
||||||
|
#elif defined (_FIXED_NORMALS_WORLDSPACE)
|
||||||
|
//World space fixed normal
|
||||||
|
return normalize(mul((float3x3)UNITY_MATRIX_V, normal));
|
||||||
#else
|
#else
|
||||||
//Model space fixed normal
|
//Model space fixed normal
|
||||||
#if defined(FIXED_NORMALS_BACKFACE_RENDERING)
|
#if defined(FIXED_NORMALS_BACKFACE_RENDERING)
|
||||||
//If back face rendering is enabled and the sprite is facing away from the camera (ie we're rendering the backface) then need to flip the normal
|
//If back face rendering is enabled and the sprite is facing away from the camera (ie we're rendering the backface) then need to flip the normal
|
||||||
normal *= backFaceSign;
|
normal *= backFaceSign;
|
||||||
#endif
|
#endif
|
||||||
return normalize(mul((float3x3)UNITY_MATRIX_IT_MV, normal));
|
return normalize(mul((float3x3)UNITY_MATRIX_IT_MV, normal));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // !MESH_NORMALS
|
#endif // !MESH_NORMALS
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,11 +172,11 @@ inline fixed3 applyRimLighting(fixed3 posWorld, fixed3 normalWorld, fixed4 pixel
|
|||||||
float invDot = 1.0 - saturate(dot(normalWorld, viewDir));
|
float invDot = 1.0 - saturate(dot(normalWorld, viewDir));
|
||||||
float rimPower = pow(invDot, _RimPower);
|
float rimPower = pow(invDot, _RimPower);
|
||||||
float rim = saturate(rimPower * _RimColor.a);
|
float rim = saturate(rimPower * _RimColor.a);
|
||||||
|
|
||||||
#if defined(_DIFFUSE_RAMP)
|
#if defined(_DIFFUSE_RAMP)
|
||||||
rim = calculateDiffuseRamp(rim).r;
|
rim = calculateDiffuseRamp(rim).r;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return lerp(pixel.rgb, _RimColor.xyz * pixel.a, rim);
|
return lerp(pixel.rgb, _RimColor.xyz * pixel.a, rim);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,4 +203,4 @@ uniform float _EmissionPower;
|
|||||||
|
|
||||||
#endif //!_EMISSION
|
#endif //!_EMISSION
|
||||||
|
|
||||||
#endif // SPRITE_LIGHTING_INCLUDED
|
#endif // SPRITE_LIGHTING_INCLUDED
|
||||||
|
|||||||
@ -81,7 +81,7 @@ Shader "Spine/Sprite/Pixel Lit"
|
|||||||
#pragma target 3.0
|
#pragma target 3.0
|
||||||
|
|
||||||
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
||||||
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE
|
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE _FIXED_NORMALS_WORLDSPACE
|
||||||
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
||||||
#pragma shader_feature _NORMALMAP
|
#pragma shader_feature _NORMALMAP
|
||||||
#pragma shader_feature _ALPHA_CLIP
|
#pragma shader_feature _ALPHA_CLIP
|
||||||
@ -118,7 +118,7 @@ Shader "Spine/Sprite/Pixel Lit"
|
|||||||
#pragma target 3.0
|
#pragma target 3.0
|
||||||
|
|
||||||
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
||||||
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE
|
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE _FIXED_NORMALS_WORLDSPACE
|
||||||
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
||||||
#pragma shader_feature _NORMALMAP
|
#pragma shader_feature _NORMALMAP
|
||||||
#pragma shader_feature _ALPHA_CLIP
|
#pragma shader_feature _ALPHA_CLIP
|
||||||
|
|||||||
@ -82,7 +82,7 @@ Shader "Spine/Sprite/Vertex Lit"
|
|||||||
#pragma target 3.0
|
#pragma target 3.0
|
||||||
|
|
||||||
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
||||||
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE
|
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE _FIXED_NORMALS_WORLDSPACE
|
||||||
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
||||||
#pragma shader_feature _NORMALMAP
|
#pragma shader_feature _NORMALMAP
|
||||||
#pragma shader_feature _ALPHA_CLIP
|
#pragma shader_feature _ALPHA_CLIP
|
||||||
|
|||||||
@ -9,7 +9,7 @@ Shader "Lightweight Render Pipeline/Spine/Sprite"
|
|||||||
_BumpMap("Normal Map", 2D) = "bump" {}
|
_BumpMap("Normal Map", 2D) = "bump" {}
|
||||||
|
|
||||||
[MaterialToggle] PixelSnap("Pixel snap", Float) = 0
|
[MaterialToggle] PixelSnap("Pixel snap", Float) = 0
|
||||||
[PerRendererData] _AlphaTex("External Alpha", 2D) = "white" {}
|
[PerRendererData] _AlphaTex("External Alpha", 2D) = "white" {}
|
||||||
[PerRendererData] _EnableExternalAlpha("Enable External Alpha", Float) = 0
|
[PerRendererData] _EnableExternalAlpha("Enable External Alpha", Float) = 0
|
||||||
|
|
||||||
_EmissionColor("Color", Color) = (0,0,0,0)
|
_EmissionColor("Color", Color) = (0,0,0,0)
|
||||||
@ -83,7 +83,7 @@ Shader "Lightweight Render Pipeline/Spine/Sprite"
|
|||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
// Material Keywords
|
// Material Keywords
|
||||||
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
||||||
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE
|
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE _FIXED_NORMALS_WORLDSPACE
|
||||||
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
||||||
#pragma shader_feature _NORMALMAP
|
#pragma shader_feature _NORMALMAP
|
||||||
#pragma shader_feature _ALPHA_CLIP
|
#pragma shader_feature _ALPHA_CLIP
|
||||||
@ -99,7 +99,7 @@ Shader "Lightweight Render Pipeline/Spine/Sprite"
|
|||||||
#pragma multi_compile_fog
|
#pragma multi_compile_fog
|
||||||
#pragma multi_compile _ PIXELSNAP_ON
|
#pragma multi_compile _ PIXELSNAP_ON
|
||||||
#pragma multi_compile _ ETC1_EXTERNAL_ALPHA
|
#pragma multi_compile _ ETC1_EXTERNAL_ALPHA
|
||||||
|
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
// Lightweight Pipeline keywords
|
// Lightweight Pipeline keywords
|
||||||
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
|
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
|
||||||
@ -108,17 +108,17 @@ Shader "Lightweight Render Pipeline/Spine/Sprite"
|
|||||||
#pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
|
#pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
|
||||||
#pragma multi_compile _ _SHADOWS_SOFT
|
#pragma multi_compile _ _SHADOWS_SOFT
|
||||||
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
|
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
|
||||||
|
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
// Unity defined keywords
|
// Unity defined keywords
|
||||||
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
||||||
#pragma multi_compile _ LIGHTMAP_ON
|
#pragma multi_compile _ LIGHTMAP_ON
|
||||||
#pragma multi_compile_fog
|
#pragma multi_compile_fog
|
||||||
|
|
||||||
//--------------------------------------
|
//--------------------------------------
|
||||||
// GPU Instancing
|
// GPU Instancing
|
||||||
#pragma multi_compile_instancing
|
#pragma multi_compile_instancing
|
||||||
|
|
||||||
//--------------------------------------
|
//--------------------------------------
|
||||||
// Spine related keywords
|
// Spine related keywords
|
||||||
#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT
|
#pragma shader_feature _ _STRAIGHT_ALPHA_INPUT
|
||||||
@ -216,7 +216,7 @@ Shader "Lightweight Render Pipeline/Spine/Sprite"
|
|||||||
ENDHLSL
|
ENDHLSL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FallBack "Hidden/InternalErrorShader"
|
FallBack "Hidden/InternalErrorShader"
|
||||||
CustomEditor "SpineSpriteShaderGUI"
|
CustomEditor "SpineSpriteShaderGUI"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,7 +82,7 @@ Shader "Universal Render Pipeline/Spine/Sprite"
|
|||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
// Material Keywords
|
// Material Keywords
|
||||||
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
#pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
|
||||||
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE
|
#pragma shader_feature _ _FIXED_NORMALS_VIEWSPACE _FIXED_NORMALS_VIEWSPACE_BACKFACE _FIXED_NORMALS_MODELSPACE _FIXED_NORMALS_MODELSPACE_BACKFACE _FIXED_NORMALS_WORLDSPACE
|
||||||
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
#pragma shader_feature _ _SPECULAR _SPECULAR_GLOSSMAP
|
||||||
#pragma shader_feature _NORMALMAP
|
#pragma shader_feature _NORMALMAP
|
||||||
#pragma shader_feature _ALPHA_CLIP
|
#pragma shader_feature _ALPHA_CLIP
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user