-
Notifications
You must be signed in to change notification settings - Fork 0
/
CurvedLitFurGeomBillboard.shader
133 lines (130 loc) · 4.05 KB
/
CurvedLitFurGeomBillboard.shader
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
Shader "A3/Billboard/CurvedLitFurGeom"
{
Properties
{
[Enum(UnityEngine.Rendering.CullMode)] _Cull("Culling", Int) = 2
_MainTex("MainTex", 2D) = "white" {}
_Color("Color", Color) = (1,1,1,1)
[Space]
_Shadow("Shadow", Range(0, 1)) = 0.4
_ShadowMag("Shadow Mag", Range(0, 10)) = 2.0
_ShadowOffset("Shadow Offset", Range(-10, 10)) = -0.5
[Toggle(_USE_INDIRECTLIGHTING)]
_UseIndirectlighting("Use Indirectlighting", Float) = 1
[Toggle(_USE_REFLECTION)]
_UseReflection("Use Reflection", Float) = 1
_ReflectionPower("Reflection Power", Range(0, 10)) = 7
_Reflection("Reflection", Range(0, 1)) = 0.02
[Space]
[Toggle(_USE_EMISSION)]
_UseEmission("Use Emission", Float) = 0
_EmissionMap("Emission Map", 2D) = "white" {}
[HDR]_EmissionColor("Emission Color", Color) = (0,0,0,1)
[Space]
[Toggle(_USE_NORMALMAP)]
_UseNormalmap("Use Normal Map", Float) = 0
_NormalMap("Normal Map", 2D) = "bump" {}
_Cutoff("Alpha Cutoff", Range(0,1)) = 0.5
[Space]
[Toggle(_USE_HIGHLIGHT)]
_UseHighLight("Use HighLight", Float) = 0
_HighLightColor( "HighLight Color", Color ) = ( 1.0, 1.0, 1.0, 1.0 )
_HighLightPower( "HighLight Power", Range( 0, 10.0 )) = 7.0
_HighLightMag( "HighLight Mag", Range( 0, 1.0 )) = 0.5
_HighLightTex ("HighLight Tex", 2D) = "white" {}
[Space]
[Toggle(_USE_HAIRLIGHT)]
_UseHairLight("Use HairLight", Float) = 0
_HairLightColor( "HairLight Color", Color ) = ( 1.0, 1.0, 1.0, 1.0 )
_HairLightTex ("HairLight Tex", 2D) = "white" {}
[Space]
[Toggle(_USE_RIM)]
_UseRim("Use Rim", Float) = 0
_RimColor( "Rim Color", Color ) = ( 1.0, 1.0, 1.0, 1.0 )
_RimPower( "Rim Power", Range( 0, 10.0 )) = 3.0
_RimLightTex ("Rim Tex", 2D) = "white" {}
[Space]
_FurMap ("FurMap", 2D) = "white" {}
[Toggle(_USE_FURTEX)]
_UseFurTex("Use FurTex", Float) = 0
_FurTex ("FurTex", 2D) = "white" {}
_FurGravity ("FurGravity", Vector) = (0.0, 9.8, 0.0, 0.0)
_FurLength ("FurLength", Range(0, 1)) = 0.03
_FurFact ("FurFact", Range(0, 10)) = 1
[Space]
_BillboardZ("Billboard Z", Float) = 0.001
[Toggle(_BILLBOARD_NUM)]
_BillboardNum("Use Div", Float) = 0
_BillboardDiv("Billboard Div", Int) = 8
[Space]
// Blending state
_Mode ("__mode", Float) = 0.0
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("__src", Float) = 1.0
[Enum(UnityEngine.Rendering.BlendMode)] _DstBlend ("__dst", Float) = 0.0
_ZWrite ("__zw", Float) = 1.0
}
SubShader
{
Tags
{
"RenderType" = "Opaque"
}
Pass
{
Name "FORWARD"
Tags { "LightMode" = "ForwardBase" }
Blend [_SrcBlend] [_DstBlend]
ZWrite [_ZWrite]
Cull [_Cull]
CGPROGRAM
#define _USE_GEOM_FUR 9
#pragma shader_feature _USE_NORMALMAP
#pragma shader_feature _USE_REFLECTION
#pragma shader_feature _USE_INDIRECTLIGHTING
#pragma shader_feature _USE_EMISSION
#pragma shader_feature _USE_RIM
#pragma shader_feature _USE_HIGHLIGHT
#pragma shader_feature _USE_HAIRLIGHT
#pragma shader_feature _USE_FURTEX
#define _USE_BILLBOARD
#pragma shader_feature _BILLBOARD_NUM
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#include "CurvedLitCore.cginc"
#pragma vertex vert
#pragma geometry geom
#pragma fragment frag
#pragma only_renderers d3d11 glcore gles
#pragma target 4.0
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
ENDCG
}
Pass
{
Name "FORWARD_DELTA"
Tags { "LightMode" = "ForwardAdd" }
Blend [_SrcBlend] One
Cull [_Cull]
CGPROGRAM
#define _USE_GEOM_FUR 9
#define _PASS_FORWARDADD
#pragma shader_feature _USE_NORMALMAP
#pragma shader_feature _USE_HIGHLIGHT
#pragma shader_feature _USE_RIM
#pragma shader_feature _USE_FURTEX
#define _USE_BILLBOARD
#pragma shader_feature _BILLBOARD_NUM
#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
#include "CurvedLitCore.cginc"
#pragma vertex vert
#pragma geometry geom
#pragma fragment frag
#pragma only_renderers d3d11 glcore gles
#pragma target 4.0
#pragma multi_compile_fwdadd_fullshadows
#pragma multi_compile_fog
ENDCG
}
}
FallBack "Diffuse"
}