-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathObject_Commentless.fx
191 lines (117 loc) · 5.68 KB
/
Object_Commentless.fx
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
//Customizable settings for MES40
//Custom settings per object (Apply this fx to the object)
//The #define lines either take 0 (disabled) or 1 (enabled) as the value, or a texture's name
//The float lines can take any decimal number, but not all of them will produce nice visual
//NOTICE: IF YOU WANT TO USE HGSHADOW, REMEMBER TO USE THE ONE INCLUDED WITH THIS SHADER
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define BLENDMODE 0 //Blend the model with the background
//0: Normal
//1: Multiply
//2: Linear Dodge (Add)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Open "HgShadow_ViewPortMap.fxsub". These settings will be repeated at the beginning of the file, edit them there the same way as you do here
#define CUSTOM_FOV 0
#define Custom_Fov_Model "MES40 Controller.pmd"
#define Custom_Fov_Bone "fov"
#define Custom_Fov_Axis 1 // 1=x | 2=y | 3=z
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//#define AnimatedTexture "animated.gif"
//#define NormalMapTexture ".png"
#define NormalMap_Invert_Red 0
#define NormalMap_Invert_Green 0
#define Toon_Use_NormalMap 1
#define Spa_CubeMap_Use_NormalMap 1
#define SpecularLight_Use_NormalMap 1
float NormalMap_Intensity = 1;
#define NormalMap_Animated 0
//#define SpecularMapTexture ".png"
#define Spa_CubeMap_Use_SpecularMap 1
#define SpecularLight_Use_SpecularMap 1
float SpecularMap_Saturation = 1;
#define SpecularMap_Animated 0
//#define CubeMapTexture "cubemap.dds"
//#define ShadingMapTexture ".png"
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
float Toon_Intensity = 1;
float Toon_Brightness = 1;
float Toon_Gradient = 3;
float Spa_CubeMap_Intensity = 1;
float Spa_CubeMap_Saturation = 1;
#define CubeMap_Affected_By_LightDirection 0
float SpecularLight_Intensity = 1;
float SpecularLight_Focus = 50;
#define SpecularLight_Affected_By_LightDirection 1
float Spa_CubeMap_SpecularLight_Tint = 1;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
float3 Rim_Color = float3(1,1,1);
#define Rim_Directional 1
float Rim_Length = 0.5; //SMALLER number means LONGER rim, only works when the rim is directional
float Rim_Intensity = 0;
float Rim_Gradient = 3;
//float Rim_Shadow_Area_Intensity = 0.5;
#define Rim_Use_NormalMap 1
#define Rim_Use_SpecularMap 1
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define LIGHTSOURCES 0
#define LightSource_Use_NormalMap 1
#define LightSource_Use_SpecularMap 1
#define LightSource_Use_Toon_Gradient 0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define PUNI_ENGINE 0
//If you use HgShadow with this feature enabled, open "HgShadow_ShadowMap.fxsub" AND "HgShadow_ViewportMap.fxsub", change the "#define PUNI_ENGINE" in there to 1 as well
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define SUBSURFACETOON 0
float3 Subsurface_Color = float3(1,0,0);
//#define ThicknessMapTexture "thickness.png"
float Subsurface_Toon_Intensity = 0.5;
float Subsurface_Toon_Gradient = 2.5;
float Subsurface_Rim_Intensity = 0.25;
float Subsurface_Rim_Gradient = 0.75;
//float Subsurface_Rim_Shadow_Area_Intensity = 0.5;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define PARALLAX 0
//#define HeightMapTexture "height.png"
float Parallax_Scale = 0.1;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define VERTEXCOLOR 0
float Vertex_Color_Intensity = 1;
#define Vertex_Color_Stored_At TEXCOORD2
//AddUV1 = TEXCOORD1
//AddUV2 = TEXCOORD2
//AddUV3 = TEXCOORD3
//AddUV4 = TEXCOORD4
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define SUBMAP 0
//#define SubMapTexture "submap.png"
#define Sub_Map_Stored_At TEXCOORD1
//AddUV1 = TEXCOORD1
//AddUV2 = TEXCOORD2
//AddUV3 = TEXCOORD3
//AddUV4 = TEXCOORD4
#define Sub_Map_Type 1
//0: Overwrite
//1: Shadow Map
//2: Light Map
//3: Shadow and Light Map
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define IBL 0
//#define IBLTexture "ibl.dds"
float IBL_Intensity = 1;
float IBL_Brightness = 1;
float IBL_Saturation = 1;
float IBL_Blur = 0;
#define IBL_Resolution 1
#define IBL_Use_NormalMap 1
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define SOFTSHADOW 1
//0: MMD's Standard Shadow
//1: HariganeP's HgShadow (Must load HgShadow.x to enable soft shadow)
#define Shadow_Sharp 0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define TOONSHADING 1
#define HALFLAMBERT 0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define ALPHATEST 0
float Alpha_Threshold = 0.5; //Scale: 0-1
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "MES40 Sync.fxsub"