-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathEffects.h
432 lines (366 loc) · 18.8 KB
/
Effects.h
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
//***************************************************************************************
// Effects.h by Frank Luna (C) 2011 All Rights Reserved.
//
// Defines lightweight effect wrappers to group an effect and its variables.
// Also defines a static Effects class from which we can access all of our effects.
//***************************************************************************************
#ifndef EFFECTS_H
#define EFFECTS_H
#include "d3dUtil.h"
#pragma region Effect
class Effect
{
public:
Effect(ID3D11Device* device, const std::wstring& filename);
virtual ~Effect();
private:
Effect(const Effect& rhs);
Effect& operator=(const Effect& rhs);
protected:
ID3DX11Effect* mFX;
};
#pragma endregion
#pragma region PlanetEffect
class PlanetEffect : public Effect
{
public:
PlanetEffect(ID3D11Device* device, const std::wstring& filename);
~PlanetEffect();
void SetEyePosW(const XMFLOAT3& v) { EyePosW->SetRawValue(&v, 0, sizeof(XMFLOAT3)); }
void SetPlanetPosW(const XMFLOAT3& v) { PlanetPosW->SetRawValue(&v, 0, sizeof(XMFLOAT3)); }
void SetCameraPos(const XMFLOAT3& v) { CameraPos->SetRawValue(&v, 0, sizeof(XMFLOAT3)); }
void SetLightPos(const XMFLOAT3& v) { LightPos->SetRawValue(&v, 0, sizeof(XMFLOAT3)); }
void SetInvWaveLength(const XMFLOAT3& v) { InvWaveLength->SetRawValue(&v, 0, sizeof(XMFLOAT3)); }
void SetCameraHeight(float f) { CameraHeight->SetFloat(f); }
void SetCameraHeight2(float f) { CameraHeight2->SetFloat(f); }
void SetOuterRadius(float f) { OuterRadius->SetFloat(f); }
void SetOuterRadius2(float f) { OuterRadius2->SetFloat(f); }
void SetInnerRadius(float f) { InnerRadius->SetFloat(f); }
void SetInnerRadius2(float f) { InnerRadius2->SetFloat(f); }
void SetKrESun(float f) { KrESun->SetFloat(f); }
void SetKmESun(float f) { KmESun->SetFloat(f); }
void SetKr4PI(float f) { Kr4PI->SetFloat(f); }
void SetKm4PI(float f) { Km4PI->SetFloat(f); }
void SetScale(float f) { Scale->SetFloat(f); }
void SetScaleOverScaleDepth(float f) { ScaleOverScaleDepth->SetFloat(f); }
void SetG(float f) { G->SetFloat(f); }
void SetG2(float f) { G2->SetFloat(f); }
ID3DX11EffectVectorVariable* EyePosW;
ID3DX11EffectVectorVariable* PlanetPosW;
ID3DX11EffectVectorVariable* CameraPos;
ID3DX11EffectVectorVariable* LightPos;
ID3DX11EffectVectorVariable* InvWaveLength;
ID3DX11EffectScalarVariable* CameraHeight;
ID3DX11EffectScalarVariable* CameraHeight2;
ID3DX11EffectScalarVariable* OuterRadius;
ID3DX11EffectScalarVariable* OuterRadius2;
ID3DX11EffectScalarVariable* InnerRadius;
ID3DX11EffectScalarVariable* InnerRadius2;
ID3DX11EffectScalarVariable* KrESun;
ID3DX11EffectScalarVariable* KmESun;
ID3DX11EffectScalarVariable* Kr4PI;
ID3DX11EffectScalarVariable* Km4PI;
ID3DX11EffectScalarVariable* Scale;
ID3DX11EffectScalarVariable* ScaleOverScaleDepth;
ID3DX11EffectScalarVariable* G;
ID3DX11EffectScalarVariable* G2;
};
#pragma endregion
#pragma region BasicEffect
class BasicEffect : public Effect
{
public:
BasicEffect(ID3D11Device* device, const std::wstring& filename);
~BasicEffect();
void SetWorldViewProj(CXMMATRIX M) { WorldViewProj->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorld(CXMMATRIX M) { World->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorldInvTranspose(CXMMATRIX M) { WorldInvTranspose->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetTexTransform(CXMMATRIX M) { TexTransform->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetEyePosW(const XMFLOAT3& v) { EyePosW->SetRawValue(&v, 0, sizeof(XMFLOAT3)); }
void SetFogColor(const FXMVECTOR v) { FogColor->SetFloatVector(reinterpret_cast<const float*>(&v)); }
void SetFogStart(float f) { FogStart->SetFloat(f); }
void SetFogRange(float f) { FogRange->SetFloat(f); }
void SetDirLights(const DirectionalLight* lights) { DirLights->SetRawValue(lights, 0, 3*sizeof(DirectionalLight)); }
void SetMaterial(const Material& mat) { Mat->SetRawValue(&mat, 0, sizeof(Material)); }
void SetDiffuseMap(ID3D11ShaderResourceView* tex) { DiffuseMap->SetResource(tex); }
void SetCubeMap(ID3D11ShaderResourceView* tex) { CubeMap->SetResource(tex); }
ID3DX11EffectTechnique* Light1Tech;
ID3DX11EffectTechnique* Light2Tech;
ID3DX11EffectTechnique* Light3Tech;
ID3DX11EffectTechnique* Light0TexTech;
ID3DX11EffectTechnique* Light1TexTech;
ID3DX11EffectTechnique* Light2TexTech;
ID3DX11EffectTechnique* Light3TexTech;
ID3DX11EffectTechnique* Light0TexAlphaClipTech;
ID3DX11EffectTechnique* Light1TexAlphaClipTech;
ID3DX11EffectTechnique* Light2TexAlphaClipTech;
ID3DX11EffectTechnique* Light3TexAlphaClipTech;
ID3DX11EffectTechnique* Light1FogTech;
ID3DX11EffectTechnique* Light2FogTech;
ID3DX11EffectTechnique* Light3FogTech;
ID3DX11EffectTechnique* Light0TexFogTech;
ID3DX11EffectTechnique* Light1TexFogTech;
ID3DX11EffectTechnique* Light2TexFogTech;
ID3DX11EffectTechnique* Light3TexFogTech;
ID3DX11EffectTechnique* Light0TexAlphaClipFogTech;
ID3DX11EffectTechnique* Light1TexAlphaClipFogTech;
ID3DX11EffectTechnique* Light2TexAlphaClipFogTech;
ID3DX11EffectTechnique* Light3TexAlphaClipFogTech;
ID3DX11EffectTechnique* Light1ReflectTech;
ID3DX11EffectTechnique* Light2ReflectTech;
ID3DX11EffectTechnique* Light3ReflectTech;
ID3DX11EffectTechnique* Light0TexReflectTech;
ID3DX11EffectTechnique* Light1TexReflectTech;
ID3DX11EffectTechnique* Light2TexReflectTech;
ID3DX11EffectTechnique* Light3TexReflectTech;
ID3DX11EffectTechnique* Light0TexAlphaClipReflectTech;
ID3DX11EffectTechnique* Light1TexAlphaClipReflectTech;
ID3DX11EffectTechnique* Light2TexAlphaClipReflectTech;
ID3DX11EffectTechnique* Light3TexAlphaClipReflectTech;
ID3DX11EffectTechnique* Light1FogReflectTech;
ID3DX11EffectTechnique* Light2FogReflectTech;
ID3DX11EffectTechnique* Light3FogReflectTech;
ID3DX11EffectTechnique* Light0TexFogReflectTech;
ID3DX11EffectTechnique* Light1TexFogReflectTech;
ID3DX11EffectTechnique* Light2TexFogReflectTech;
ID3DX11EffectTechnique* Light3TexFogReflectTech;
ID3DX11EffectTechnique* Light0TexAlphaClipFogReflectTech;
ID3DX11EffectTechnique* Light1TexAlphaClipFogReflectTech;
ID3DX11EffectTechnique* Light2TexAlphaClipFogReflectTech;
ID3DX11EffectTechnique* Light3TexAlphaClipFogReflectTech;
ID3DX11EffectMatrixVariable* WorldViewProj;
ID3DX11EffectMatrixVariable* World;
ID3DX11EffectMatrixVariable* WorldInvTranspose;
ID3DX11EffectMatrixVariable* TexTransform;
ID3DX11EffectVectorVariable* EyePosW;
ID3DX11EffectVectorVariable* FogColor;
ID3DX11EffectScalarVariable* FogStart;
ID3DX11EffectScalarVariable* FogRange;
ID3DX11EffectVariable* DirLights;
ID3DX11EffectVariable* Mat;
ID3DX11EffectShaderResourceVariable* DiffuseMap;
ID3DX11EffectShaderResourceVariable* CubeMap;
};
#pragma endregion
#pragma region NormalMapEffect
class NormalMapEffect : public Effect
{
public:
NormalMapEffect(ID3D11Device* device, const std::wstring& filename);
~NormalMapEffect();
void SetWorldViewProj(CXMMATRIX M) { WorldViewProj->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorld(CXMMATRIX M) { World->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorldInvTranspose(CXMMATRIX M) { WorldInvTranspose->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetTexTransform(CXMMATRIX M) { TexTransform->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetEyePosW(const XMFLOAT3& v) { EyePosW->SetRawValue(&v, 0, sizeof(XMFLOAT3)); }
void SetFogColor(const FXMVECTOR v) { FogColor->SetFloatVector(reinterpret_cast<const float*>(&v)); }
void SetFogStart(float f) { FogStart->SetFloat(f); }
void SetFogRange(float f) { FogRange->SetFloat(f); }
void SetDirLights(const DirectionalLight* lights) { DirLights->SetRawValue(lights, 0, 3*sizeof(DirectionalLight)); }
void SetMaterial(const Material& mat) { Mat->SetRawValue(&mat, 0, sizeof(Material)); }
void SetDiffuseMap(ID3D11ShaderResourceView* tex) { DiffuseMap->SetResource(tex); }
void SetCubeMap(ID3D11ShaderResourceView* tex) { CubeMap->SetResource(tex); }
void SetNormalMap(ID3D11ShaderResourceView* tex) { NormalMap->SetResource(tex); }
ID3DX11EffectTechnique* Light1Tech;
ID3DX11EffectTechnique* Light2Tech;
ID3DX11EffectTechnique* Light3Tech;
ID3DX11EffectTechnique* Light0TexTech;
ID3DX11EffectTechnique* Light1TexTech;
ID3DX11EffectTechnique* Light2TexTech;
ID3DX11EffectTechnique* Light3TexTech;
ID3DX11EffectTechnique* Light0TexAlphaClipTech;
ID3DX11EffectTechnique* Light1TexAlphaClipTech;
ID3DX11EffectTechnique* Light2TexAlphaClipTech;
ID3DX11EffectTechnique* Light3TexAlphaClipTech;
ID3DX11EffectTechnique* Light1FogTech;
ID3DX11EffectTechnique* Light2FogTech;
ID3DX11EffectTechnique* Light3FogTech;
ID3DX11EffectTechnique* Light0TexFogTech;
ID3DX11EffectTechnique* Light1TexFogTech;
ID3DX11EffectTechnique* Light2TexFogTech;
ID3DX11EffectTechnique* Light3TexFogTech;
ID3DX11EffectTechnique* Light0TexAlphaClipFogTech;
ID3DX11EffectTechnique* Light1TexAlphaClipFogTech;
ID3DX11EffectTechnique* Light2TexAlphaClipFogTech;
ID3DX11EffectTechnique* Light3TexAlphaClipFogTech;
ID3DX11EffectTechnique* Light1ReflectTech;
ID3DX11EffectTechnique* Light2ReflectTech;
ID3DX11EffectTechnique* Light3ReflectTech;
ID3DX11EffectTechnique* Light0TexReflectTech;
ID3DX11EffectTechnique* Light1TexReflectTech;
ID3DX11EffectTechnique* Light2TexReflectTech;
ID3DX11EffectTechnique* Light3TexReflectTech;
ID3DX11EffectTechnique* Light0TexAlphaClipReflectTech;
ID3DX11EffectTechnique* Light1TexAlphaClipReflectTech;
ID3DX11EffectTechnique* Light2TexAlphaClipReflectTech;
ID3DX11EffectTechnique* Light3TexAlphaClipReflectTech;
ID3DX11EffectTechnique* Light1FogReflectTech;
ID3DX11EffectTechnique* Light2FogReflectTech;
ID3DX11EffectTechnique* Light3FogReflectTech;
ID3DX11EffectTechnique* Light0TexFogReflectTech;
ID3DX11EffectTechnique* Light1TexFogReflectTech;
ID3DX11EffectTechnique* Light2TexFogReflectTech;
ID3DX11EffectTechnique* Light3TexFogReflectTech;
ID3DX11EffectTechnique* Light0TexAlphaClipFogReflectTech;
ID3DX11EffectTechnique* Light1TexAlphaClipFogReflectTech;
ID3DX11EffectTechnique* Light2TexAlphaClipFogReflectTech;
ID3DX11EffectTechnique* Light3TexAlphaClipFogReflectTech;
ID3DX11EffectMatrixVariable* WorldViewProj;
ID3DX11EffectMatrixVariable* World;
ID3DX11EffectMatrixVariable* WorldInvTranspose;
ID3DX11EffectMatrixVariable* TexTransform;
ID3DX11EffectVectorVariable* EyePosW;
ID3DX11EffectVectorVariable* FogColor;
ID3DX11EffectScalarVariable* FogStart;
ID3DX11EffectScalarVariable* FogRange;
ID3DX11EffectVariable* DirLights;
ID3DX11EffectVariable* Mat;
ID3DX11EffectShaderResourceVariable* DiffuseMap;
ID3DX11EffectShaderResourceVariable* CubeMap;
ID3DX11EffectShaderResourceVariable* NormalMap;
};
#pragma endregion
#pragma region DisplacementMapEffect
class DisplacementMapEffect : public PlanetEffect
{
public:
DisplacementMapEffect(ID3D11Device* device, const std::wstring& filename);
~DisplacementMapEffect();
void SetViewProj(CXMMATRIX M) { ViewProj->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorldViewProj(CXMMATRIX M) { WorldViewProj->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorld(CXMMATRIX M) { World->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorldInvTranspose(CXMMATRIX M) { WorldInvTranspose->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetTexTransform(CXMMATRIX M) { TexTransform->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetDirLights(const DirectionalLight* lights) { DirLights->SetRawValue(lights, 0, 3*sizeof(DirectionalLight)); }
void SetMaterial(const Material& mat) { Mat->SetRawValue(&mat, 0, sizeof(Material)); }
void SetHeightScale(float f) { HeightScale->SetFloat(f); }
void SetMaxTessDistance(float f) { MaxTessDistance->SetFloat(f); }
void SetMinTessDistance(float f) { MinTessDistance->SetFloat(f); }
void SetMinTessFactor(float f) { MinTessFactor->SetFloat(f); }
void SetMaxTessFactor(float f) { MaxTessFactor->SetFloat(f); }
void SetDiffuseMap(ID3D11ShaderResourceView* tex) { DiffuseMap->SetResource(tex); }
void SetCubeMap(ID3D11ShaderResourceView* tex) { CubeMap->SetResource(tex); }
void SetNormalMap(ID3D11ShaderResourceView* tex) { NormalMap->SetResource(tex); }
ID3DX11EffectTechnique* PlanetFromSpaceTech;
ID3DX11EffectTechnique* PlanetFromAtmoTech;
ID3DX11EffectMatrixVariable* ViewProj;
ID3DX11EffectMatrixVariable* WorldViewProj;
ID3DX11EffectMatrixVariable* World;
ID3DX11EffectMatrixVariable* WorldInvTranspose;
ID3DX11EffectMatrixVariable* TexTransform;
ID3DX11EffectVariable* DirLights;
ID3DX11EffectVariable* Mat;
ID3DX11EffectScalarVariable* HeightScale;
ID3DX11EffectScalarVariable* MaxTessDistance;
ID3DX11EffectScalarVariable* MinTessDistance;
ID3DX11EffectScalarVariable* MinTessFactor;
ID3DX11EffectScalarVariable* MaxTessFactor;
ID3DX11EffectShaderResourceVariable* DiffuseMap;
ID3DX11EffectShaderResourceVariable* CubeMap;
ID3DX11EffectShaderResourceVariable* NormalMap;
};
#pragma endregion
#pragma region CloudsEffect
class CloudsEffect : public PlanetEffect
{
public:
CloudsEffect(ID3D11Device* device, const std::wstring& filename);
~CloudsEffect();
void SetViewProj(CXMMATRIX M) { ViewProj->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorldViewProj(CXMMATRIX M) { WorldViewProj->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorld(CXMMATRIX M) { World->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorldInvTranspose(CXMMATRIX M) { WorldInvTranspose->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetTexTransform(CXMMATRIX M) { TexTransform->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetDirLights(const DirectionalLight* lights) { DirLights->SetRawValue(lights, 0, 3*sizeof(DirectionalLight)); }
void SetMaterial(const Material& mat) { Mat->SetRawValue(&mat, 0, sizeof(Material)); }
void SetHeightScale(float f) { HeightScale->SetFloat(f); }
void SetMaxTessDistance(float f) { MaxTessDistance->SetFloat(f); }
void SetMinTessDistance(float f) { MinTessDistance->SetFloat(f); }
void SetMinTessFactor(float f) { MinTessFactor->SetFloat(f); }
void SetMaxTessFactor(float f) { MaxTessFactor->SetFloat(f); }
void SetDiffuseMap(ID3D11ShaderResourceView* tex) { DiffuseMap->SetResource(tex); }
void SetCubeMap(ID3D11ShaderResourceView* tex) { CubeMap->SetResource(tex); }
void SetNormalMap(ID3D11ShaderResourceView* tex) { NormalMap->SetResource(tex); }
ID3DX11EffectTechnique* CloudsFromSpaceTech;
ID3DX11EffectTechnique* CloudsFromAtmoTech;
ID3DX11EffectMatrixVariable* ViewProj;
ID3DX11EffectMatrixVariable* WorldViewProj;
ID3DX11EffectMatrixVariable* World;
ID3DX11EffectMatrixVariable* WorldInvTranspose;
ID3DX11EffectMatrixVariable* TexTransform;
ID3DX11EffectVariable* DirLights;
ID3DX11EffectVariable* Mat;
ID3DX11EffectScalarVariable* HeightScale;
ID3DX11EffectScalarVariable* MaxTessDistance;
ID3DX11EffectScalarVariable* MinTessDistance;
ID3DX11EffectScalarVariable* MinTessFactor;
ID3DX11EffectScalarVariable* MaxTessFactor;
ID3DX11EffectShaderResourceVariable* DiffuseMap;
ID3DX11EffectShaderResourceVariable* CubeMap;
ID3DX11EffectShaderResourceVariable* NormalMap;
};
#pragma endregion
#pragma region SkyEffect
class SkyEffect : public PlanetEffect
{
public:
SkyEffect(ID3D11Device* device, const std::wstring& filename);
~SkyEffect();
void SetWorldViewProj(CXMMATRIX M) { WorldViewProj->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorld(CXMMATRIX M) { World->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorldInvTranspose(CXMMATRIX M) { WorldInvTranspose->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetDirLights(const DirectionalLight* lights) { DirLights->SetRawValue(lights, 0, 3*sizeof(DirectionalLight)); }
void SetMaterial(const Material& mat) { Mat->SetRawValue(&mat, 0, sizeof(Material)); }
ID3DX11EffectTechnique* SkyFromSpaceTech;
ID3DX11EffectTechnique* SkyFromAtmoTech;
ID3DX11EffectMatrixVariable* WorldViewProj;
ID3DX11EffectMatrixVariable* World;
ID3DX11EffectMatrixVariable* WorldInvTranspose;
ID3DX11EffectVariable* DirLights;
ID3DX11EffectVariable* Mat;
};
#pragma endregion
#pragma region SpaceEffect
class SpaceEffect : public PlanetEffect
{
public:
SpaceEffect(ID3D11Device* device, const std::wstring& filename);
~SpaceEffect();
void SetWorldViewProj(CXMMATRIX M) { WorldViewProj->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorld(CXMMATRIX M) { World->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetWorldInvTranspose(CXMMATRIX M) { WorldInvTranspose->SetMatrix(reinterpret_cast<const float*>(&M)); }
void SetEyePosW(const XMFLOAT3& v) { EyePosW->SetRawValue(&v, 0, sizeof(XMFLOAT3)); }
void SetFogColor(const FXMVECTOR v) { FogColor->SetFloatVector(reinterpret_cast<const float*>(&v)); }
void SetFogStart(float f) { FogStart->SetFloat(f); }
void SetFogRange(float f) { FogRange->SetFloat(f); }
void SetDirLights(const DirectionalLight* lights) { DirLights->SetRawValue(lights, 0, 3*sizeof(DirectionalLight)); }
void SetMaterial(const Material& mat) { Mat->SetRawValue(&mat, 0, sizeof(Material)); }
ID3DX11EffectTechnique* SpaceFromSpaceTech;
ID3DX11EffectTechnique* SpaceFromAtmoTech;
ID3DX11EffectMatrixVariable* WorldViewProj;
ID3DX11EffectMatrixVariable* World;
ID3DX11EffectMatrixVariable* WorldInvTranspose;
ID3DX11EffectVectorVariable* EyePosW;
ID3DX11EffectVectorVariable* FogColor;
ID3DX11EffectScalarVariable* FogStart;
ID3DX11EffectScalarVariable* FogRange;
ID3DX11EffectVariable* DirLights;
ID3DX11EffectVariable* Mat;
};
#pragma endregion
#pragma region Effects
class Effects
{
public:
static void InitAll(ID3D11Device* device);
static void DestroyAll();
static BasicEffect* BasicFX;
static PlanetEffect* PlanetFX;
static NormalMapEffect* NormalMapFX;
static DisplacementMapEffect* DisplacementMapFX;
static CloudsEffect* CloudsFX;
static SkyEffect* SkyFX;
static SpaceEffect* SpaceFX;
};
#pragma endregion
#endif // EFFECTS_H