"#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"