blob: ad83889e4b766a339ade31e870004a2dc20ccb9a (
plain)
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
|
"#ifndef _TONE_MAPPING_STRUCTURES_FXH_\n"
"#define _TONE_MAPPING_STRUCTURES_FXH_\n"
"\n"
"#ifdef __cplusplus\n"
"\n"
"# ifndef BOOL\n"
"# define BOOL int32_t // Do not use bool, because sizeof(bool)==1 !\n"
"# endif\n"
"\n"
"# ifndef TRUE\n"
"# define TRUE 1\n"
"# endif\n"
"\n"
"# ifndef CHECK_STRUCT_ALIGNMENT\n"
" // Note that defining empty macros causes GL shader compilation error on Mac, because\n"
" // it does not allow standalone semicolons outside of main.\n"
" // On the other hand, adding semicolon at the end of the macro definition causes gcc error.\n"
"# define CHECK_STRUCT_ALIGNMENT(s) static_assert( sizeof(s) % 16 == 0, \"sizeof(\" #s \") is not multiple of 16\" )\n"
"# endif\n"
"\n"
"# ifndef DEFAULT_VALUE\n"
"# define DEFAULT_VALUE(x) =x\n"
"# endif\n"
"\n"
"#else\n"
"\n"
"# ifndef BOOL\n"
"# define BOOL bool\n"
"# endif\n"
"\n"
"# ifndef DEFAULT_VALUE\n"
"# define DEFAULT_VALUE(x)\n"
"# endif\n"
"\n"
"#endif\n"
"\n"
"\n"
"// Tone mapping mode\n"
"#define TONE_MAPPING_MODE_EXP 0\n"
"#define TONE_MAPPING_MODE_REINHARD 1\n"
"#define TONE_MAPPING_MODE_REINHARD_MOD 2\n"
"#define TONE_MAPPING_MODE_UNCHARTED2 3\n"
"#define TONE_MAPPING_FILMIC_ALU 4\n"
"#define TONE_MAPPING_LOGARITHMIC 5\n"
"#define TONE_MAPPING_ADAPTIVE_LOG 6\n"
"\n"
"struct ToneMappingAttribs\n"
"{\n"
" // Tone mapping mode.\n"
" int iToneMappingMode DEFAULT_VALUE(TONE_MAPPING_MODE_UNCHARTED2);\n"
" // Automatically compute exposure to use in tone mapping.\n"
" BOOL bAutoExposure DEFAULT_VALUE(TRUE);\n"
" // Middle gray value used by tone mapping operators.\n"
" float fMiddleGray DEFAULT_VALUE(0.18f);\n"
" // Simulate eye adaptation to light changes.\n"
" BOOL bLightAdaptation DEFAULT_VALUE(TRUE);\n"
"\n"
" // White point to use in tone mapping.\n"
" float fWhitePoint DEFAULT_VALUE(3.f);\n"
" // Luminance point to use in tone mapping.\n"
" float fLuminanceSaturation DEFAULT_VALUE(1.f);\n"
" uint Padding0;\n"
" uint Padding1;\n"
"};\n"
"#ifdef CHECK_STRUCT_ALIGNMENT\n"
" CHECK_STRUCT_ALIGNMENT(ToneMappingAttribs);\n"
"#endif\n"
"\n"
"#endif // _TONE_MAPPING_STRUCTURES_FXH_\n"
|