This commit is contained in:
JA
2026-06-27 03:36:46 +08:00
parent aec4e97d27
commit 7a8d4a5d83
1215 changed files with 48271 additions and 146052 deletions

View File

@@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: e8c87a44b93daed4383ca2ca5dfb3c43
folderAsset: yes
timeCreated: 1573827942
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,46 +0,0 @@
Contributed by ToddRivers
# Unity Sprite Shaders
An Uber Shader specialised for rendering Sprites in Unity.
Even though it's designed for Sprites it can be used for a whole range of uses. It supports a wide range of optional shader features that won't effect performance unless they are used.
It also supports per-pixel effects such as normal maps and diffuse ramping whilst using Vertex Lit rendering.
### Lighting
The shaders support lighting using both Forward Rendering and Vertex Lit Rendering.
Forward rendering is more accurate but is slower and crucially means the sprite has to write to depth using alpha clipping to avoid overdraw.
Vertex lit means all lighting can be done in one pass meaning full alpha can be used.
### Normal Mapping
Normals maps are supported in both lighting modes (in Vertex Lit rendering data for normal mapping is packed into texture channels and then processed per pixel).
### Blend Modes
Easily switch between blend modes including pre-multiplied alpha, additive, multiply etc.
### Rim Lighting
Camera-space rim lighting is supported in both lighting modes.
### Diffuse Ramp
A ramp texture is optionally supported for toon shading effects.
### Shadows
Shadows are supported using alpha clipping.
### Gradient based Ambient lighting
Both lighting modes support using a gradient for ambient light. In Vertex Lit mode the Spherical Harmonics is approximated from the ground, equator and sky colors.
### Emission Map
An optional emission map is supported.
### Camera Space Normals
As sprites are 2d their normals will always be constant. The shaders allow you to define a fixed normal in camera space rather than pass through mesh normals.
This not only saves vertex throughput but means lighting looks less 'flat' for rendering sprites with a perspective camera.
### Color Adjustment
The shaders allow optional adjustment of hue / saturation and brightness as well as applying a solid color overlay effect for flashing a sprite to a solid color (eg. for damage effects).
### Fog
Fog is optionally supported
## To Use
On your object's material click the drop down for shader and select Spine\Sprite\Pixel Lit, Vertex Lit or Unlit.

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: cecd0ea162097a94c89a97af6baf0a66
timeCreated: 1479457854
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,66 +0,0 @@
Shader "Hidden/Spine/Bones" {
Properties {
_Color ("Color", Color) = (0.5,0.5,0.5,0.5)
_MainTex ("Particle Texture", 2D) = "white" {}
}
Category {
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
AlphaTest Greater .01
ColorMask RGB
Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off }
SubShader {
Pass {
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
// #pragma multi_compile_particles
#include "UnityCG.cginc"
sampler2D _MainTex;
fixed4 _Color;
struct appdata_t {
float4 vertex : POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
};
struct v2f {
float4 vertex : SV_POSITION;
fixed4 color : COLOR;
float2 texcoord : TEXCOORD0;
// #ifdef SOFTPARTICLES_ON
// float4 projPos : TEXCOORD1;
// #endif
};
float4 _MainTex_ST;
v2f vert (appdata_t v) {
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
// #ifdef SOFTPARTICLES_ON
// o.projPos = ComputeScreenPos (o.vertex);
// COMPUTE_EYEDEPTH(o.projPos.z);
// #endif
o.color = v.color;
o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
return o;
}
sampler2D_float _CameraDepthTexture;
fixed4 frag (v2f i) : SV_Target {
return i.color * _Color * tex2D(_MainTex, i.texcoord);
}
ENDCG
}
}
}
}

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 66988de88a15abd4e8846c6805485f57
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,37 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: HiddenPass
m_Shader: {fileID: 4800000, guid: 913475501bf19374c84390868a9d6d3d, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: _Cutoff
second: 0.1
- first:
name: _InvFade
second: 1
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
- first:
name: _TintColor
second: {r: 0.5, g: 0.5, b: 0.5, a: 0}

View File

@@ -1,6 +0,0 @@
fileFormatVersion: 2
guid: 43227e5adadc6f24bb4bf74b92a56fb4
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,12 +0,0 @@
Shader "Spine/Special/HiddenPass" {
SubShader
{
Tags {"Queue" = "Geometry-1" }
Lighting Off
Pass
{
ZWrite Off
ColorMask 0
}
}
}

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 913475501bf19374c84390868a9d6d3d
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant: