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
|
Shader "yum_food/cloud"
{
Properties
{
_Ball_Height("Ball height", float) = 0.15
_Ball_Scale("Ball scale", float) = 1.0
_Cloud_Y_Off("cloud Y offset", float) = -.3
_Cloud_Opacity("cloud opacity", float) = 0.25
_Cloud_W("cloud FBM W=", float) = 0.35
_Cloud_Scale("cloud scale", float) = 2
_Sphere_Scale("Sphere scale", float) = 1
_Global_Scale("Global scale", float) = 1
_Orientation("Orientation (axis and angle in radians)", Vector) = (1, 0, 0, 0)
_Offset("Offset (meters)", Vector) = (0, 0, 0, 0)
[MaterialToggle] _Enable_Matcap("Enable matcap", float) = 1
_Matcap("Matcap", 2D) = "black" {}
_Matcap_Str("Matcap strength", float) = 1.0
_Matcap_Mode("Matcap mode: 1 add, 2 mul, 3 replace, 4 sub", Range(1,4)) = 1
[MaterialToggle] _Enable_Custom_Cubemap("Enable custom cubemap", float) = 0
_Custom_Cubemap("Custom cubemap", Cube) = "" {}
}
SubShader
{
Pass {
Tags {
"RenderType"="Opaque"
"Queue"="AlphaTest+499"
"LightMode" = "ForwardBase"
}
Blend SrcAlpha OneMinusSrcAlpha
Cull Back
ZTest LEqual
CGPROGRAM
#pragma target 5.0
#pragma multi_compile _ VERTEXLIGHT_ON
#pragma vertex vert
#pragma fragment frag
#define FORWARD_BASE_PASS
#include "cloud_lighting.cginc"
ENDCG
}
Pass {
Tags {
"RenderType" = "Opaque"
"LightMode" = "ForwardAdd"
"Queue"="AlphaTest+499"
}
Blend One One
Cull Back
ZTest LEqual
CGPROGRAM
#pragma target 5.0
#pragma multi_compile_fwdadd
#pragma vertex vert
#pragma fragment frag
#include "cloud_lighting.cginc"
ENDCG
}
}
//CustomEditor "TaSTTShaderGUI"
}
|