ReShadeUI.fxh (14148B)
1 #pragma once 2 3 #if !defined(__RESHADE__) || __RESHADE__ < 30000 4 #error "ReShade 3.0+ is required to use this header file" 5 #endif 6 7 #define RESHADE_VERSION(major,minor,build) (10000 * (major) + 100 * (minor) + (build)) 8 #define SUPPORTED_VERSION(major,minor,build) (__RESHADE__ >= RESHADE_VERSION(major,minor,build)) 9 10 // Since 3.0.0 11 // Commit current in-game user interface status 12 // https://github.com/crosire/reshade/commit/302bacc49ae394faedc2e29a296c1cebf6da6bb2#diff-82cf230afdb2a0d5174111e6f17548a5R1183 13 // Added various GUI related uniform variable annotations 14 // https://reshade.me/forum/releases/2341-3-0 15 #define __UNIFORM_INPUT_ANY ui_type = "input"; 16 17 #define __UNIFORM_INPUT_BOOL1 __UNIFORM_INPUT_ANY // It is unsupported on all version 18 #define __UNIFORM_INPUT_BOOL2 __UNIFORM_INPUT_ANY // It is unsupported on all version 19 #define __UNIFORM_INPUT_BOOL3 __UNIFORM_INPUT_ANY // It is unsupported on all version 20 #define __UNIFORM_INPUT_BOOL4 __UNIFORM_INPUT_ANY // It is unsupported on all version 21 #define __UNIFORM_INPUT_INT1 __UNIFORM_INPUT_ANY // If it was not supported in someday or now, please add information 22 #define __UNIFORM_INPUT_INT2 __UNIFORM_INPUT_ANY // If it was not supported in someday or now, please add information 23 #define __UNIFORM_INPUT_INT3 __UNIFORM_INPUT_ANY // If it was not supported in someday or now, please add information 24 #define __UNIFORM_INPUT_INT4 __UNIFORM_INPUT_ANY // If it was not supported in someday or now, please add information 25 #define __UNIFORM_INPUT_FLOAT1 __UNIFORM_INPUT_ANY // If it was not supported in someday or now, please add information 26 #define __UNIFORM_INPUT_FLOAT2 __UNIFORM_INPUT_ANY // If it was not supported in someday or now, please add information 27 #define __UNIFORM_INPUT_FLOAT3 __UNIFORM_INPUT_ANY // If it was not supported in someday or now, please add information 28 #define __UNIFORM_INPUT_FLOAT4 __UNIFORM_INPUT_ANY // If it was not supported in someday or now, please add information 29 30 // Since 4.0.1 31 // Change slider widget to be used with new "slider" instead of a "drag" type annotation 32 // https://github.com/crosire/reshade/commit/746229f31cd6f311a3e72a543e4f1f23faa23f11#diff-59405a313bd8cbfb0ca6dd633230e504R1701 33 // Changed slider widget to be used with < ui_type = "slider"; > instead of < ui_type = "drag"; > 34 // https://reshade.me/forum/releases/4772-4-0 35 #if SUPPORTED_VERSION(4,0,1) 36 #define __UNIFORM_DRAG_ANY ui_type = "drag"; 37 38 // Since 4.0.0 39 // Rework statistics tab and add drag widgets back 40 // https://github.com/crosire/reshade/commit/1b2c38795f00efd66c007da1f483f1441b230309 41 // Changed drag widget to a slider widget (old one is still available via < ui_type = "drag2"; >) 42 // https://reshade.me/forum/releases/4772-4-0 43 #elif SUPPORTED_VERSION(4,0,0) 44 #define __UNIFORM_DRAG_ANY ui_type = "drag2"; 45 46 // Since 3.0.0 47 // Commit current in-game user interface status 48 // https://github.com/crosire/reshade/commit/302bacc49ae394faedc2e29a296c1cebf6da6bb2#diff-82cf230afdb2a0d5174111e6f17548a5R1187 49 // Added various GUI related uniform variable annotations 50 // https://reshade.me/forum/releases/2341-3-0 51 #else 52 #define __UNIFORM_DRAG_ANY ui_type = "drag"; 53 #endif 54 55 #define __UNIFORM_DRAG_BOOL1 __UNIFORM_DRAG_ANY // It is unsupported on all version 56 #define __UNIFORM_DRAG_BOOL2 __UNIFORM_DRAG_ANY // It is unsupported on all version 57 #define __UNIFORM_DRAG_BOOL3 __UNIFORM_DRAG_ANY // It is unsupported on all version 58 #define __UNIFORM_DRAG_BOOL4 __UNIFORM_DRAG_ANY // It is unsupported on all version 59 #define __UNIFORM_DRAG_INT1 __UNIFORM_DRAG_ANY // If it was not supported in someday or now, please add information 60 #define __UNIFORM_DRAG_INT2 __UNIFORM_DRAG_ANY // If it was not supported in someday or now, please add information 61 #define __UNIFORM_DRAG_INT3 __UNIFORM_DRAG_ANY // If it was not supported in someday or now, please add information 62 #define __UNIFORM_DRAG_INT4 __UNIFORM_DRAG_ANY // If it was not supported in someday or now, please add information 63 #define __UNIFORM_DRAG_FLOAT1 __UNIFORM_DRAG_ANY // If it was not supported in someday or now, please add information 64 #define __UNIFORM_DRAG_FLOAT2 __UNIFORM_DRAG_ANY // If it was not supported in someday or now, please add information 65 #define __UNIFORM_DRAG_FLOAT3 __UNIFORM_DRAG_ANY // If it was not supported in someday or now, please add information 66 #define __UNIFORM_DRAG_FLOAT4 __UNIFORM_DRAG_ANY // If it was not supported in someday or now, please add information 67 68 // Since 4.0.1 69 // Change slider widget to be used with new "slider" instead of a "drag" type annotation 70 // https://github.com/crosire/reshade/commit/746229f31cd6f311a3e72a543e4f1f23faa23f11#diff-59405a313bd8cbfb0ca6dd633230e504R1699 71 // Changed slider widget to be used with < ui_type = "slider"; > instead of < ui_type = "drag"; > 72 // https://reshade.me/forum/releases/4772-4-0 73 #if SUPPORTED_VERSION(4,0,1) 74 #define __UNIFORM_SLIDER_ANY ui_type = "slider"; 75 76 // Since 4.0.0 77 // Rework statistics tab and add drag widgets back 78 // https://github.com/crosire/reshade/commit/1b2c38795f00efd66c007da1f483f1441b230309 79 // Changed drag widget to a slider widget (old one is still available via < ui_type = "drag2"; >) 80 // https://reshade.me/forum/releases/4772-4-0 81 #elif SUPPORTED_VERSION(4,0,0) 82 #define __UNIFORM_SLIDER_ANY ui_type = "drag"; 83 #else 84 #define __UNIFORM_SLIDER_ANY __UNIFORM_DRAG_ANY 85 #endif 86 87 #define __UNIFORM_SLIDER_BOOL1 __UNIFORM_SLIDER_ANY // It is unsupported on all version 88 #define __UNIFORM_SLIDER_BOOL2 __UNIFORM_SLIDER_ANY // It is unsupported on all version 89 #define __UNIFORM_SLIDER_BOOL3 __UNIFORM_SLIDER_ANY // It is unsupported on all version 90 #define __UNIFORM_SLIDER_BOOL4 __UNIFORM_SLIDER_ANY // It is unsupported on all version 91 #define __UNIFORM_SLIDER_INT1 __UNIFORM_SLIDER_ANY // If it was not supported in someday or now, please add information 92 #define __UNIFORM_SLIDER_INT2 __UNIFORM_SLIDER_ANY // If it was not supported in someday or now, please add information 93 #define __UNIFORM_SLIDER_INT3 __UNIFORM_SLIDER_ANY // If it was not supported in someday or now, please add information 94 #define __UNIFORM_SLIDER_INT4 __UNIFORM_SLIDER_ANY // If it was not supported in someday or now, please add information 95 #define __UNIFORM_SLIDER_FLOAT1 __UNIFORM_SLIDER_ANY // If it was not supported in someday or now, please add information 96 #define __UNIFORM_SLIDER_FLOAT2 __UNIFORM_SLIDER_ANY // If it was not supported in someday or now, please add information 97 #define __UNIFORM_SLIDER_FLOAT3 __UNIFORM_SLIDER_ANY // If it was not supported in someday or now, please add information 98 #define __UNIFORM_SLIDER_FLOAT4 __UNIFORM_SLIDER_ANY // If it was not supported in someday or now, please add information 99 100 // Since 3.0.0 101 // Add combo box display type for uniform variables and fix displaying of integer variable under Direct3D 9 102 // https://github.com/crosire/reshade/commit/b025bfae5f7343509ec0cacf6df0cff537c499f2#diff-82cf230afdb2a0d5174111e6f17548a5R1631 103 // Added various GUI related uniform variable annotations 104 // https://reshade.me/forum/releases/2341-3-0 105 #define __UNIFORM_COMBO_ANY ui_type = "combo"; 106 107 // __UNIFORM_COMBO_BOOL1 108 #define __UNIFORM_COMBO_BOOL2 __UNIFORM_COMBO_ANY // It is unsupported on all version 109 #define __UNIFORM_COMBO_BOOL3 __UNIFORM_COMBO_ANY // It is unsupported on all version 110 #define __UNIFORM_COMBO_BOOL4 __UNIFORM_COMBO_ANY // It is unsupported on all version 111 #define __UNIFORM_COMBO_INT1 __UNIFORM_COMBO_ANY // If it was not supported in someday or now, please add information 112 #define __UNIFORM_COMBO_INT2 __UNIFORM_COMBO_ANY // If it was not supported in someday or now, please add information 113 #define __UNIFORM_COMBO_INT3 __UNIFORM_COMBO_ANY // If it was not supported in someday or now, please add information 114 #define __UNIFORM_COMBO_INT4 __UNIFORM_COMBO_ANY // If it was not supported in someday or now, please add information 115 #define __UNIFORM_COMBO_FLOAT1 __UNIFORM_COMBO_ANY // It is unsupported on all version 116 #define __UNIFORM_COMBO_FLOAT2 __UNIFORM_COMBO_ANY // It is unsupported on all version 117 #define __UNIFORM_COMBO_FLOAT3 __UNIFORM_COMBO_ANY // It is unsupported on all version 118 #define __UNIFORM_COMBO_FLOAT4 __UNIFORM_COMBO_ANY // It is unsupported on all version 119 120 // Since 4.0.0 (but the ui_items force set "Off\0On\0"), and if less than it force converted to checkbox 121 // Add option to display boolean values as combo box instead of checkbox 122 // https://github.com/crosire/reshade/commit/aecb757c864c9679e77edd6f85a1521c49e489c1#diff-59405a313bd8cbfb0ca6dd633230e504R1147 123 // https://github.com/crosire/reshade/blob/v4.0.0/source/gui.cpp 124 // Added option to display boolean values as combo box instead of checkbox (via < ui_type = "combo"; >) 125 // https://reshade.me/forum/releases/4772-4-0 126 #define __UNIFORM_COMBO_BOOL1 __UNIFORM_COMBO_ANY 127 128 // Since 4.0.0 129 // Cleanup GUI code and rearrange some widgets 130 // https://github.com/crosire/reshade/commit/6751f7bd50ea7c0556cf0670f10a4b4ba912ee7d#diff-59405a313bd8cbfb0ca6dd633230e504R1711 131 // Added radio button widget (via < ui_type = "radio"; ui_items = "Button 1\0Button 2\0...\0"; >) 132 // https://reshade.me/forum/releases/4772-4-0 133 #if SUPPORTED_VERSION(4,0,0) 134 #define __UNIFORM_RADIO_ANY ui_type = "radio"; 135 #else 136 #define __UNIFORM_RADIO_ANY __UNIFORM_COMBO_ANY 137 #endif 138 139 #define __UNIFORM_RADIO_BOOL1 __UNIFORM_RADIO_ANY // It is unsupported on all version 140 #define __UNIFORM_RADIO_BOOL2 __UNIFORM_RADIO_ANY // It is unsupported on all version 141 #define __UNIFORM_RADIO_BOOL3 __UNIFORM_RADIO_ANY // It is unsupported on all version 142 #define __UNIFORM_RADIO_BOOL4 __UNIFORM_RADIO_ANY // It is unsupported on all version 143 #define __UNIFORM_RADIO_INT1 __UNIFORM_RADIO_ANY // If it was not supported in someday or now, please add information 144 #define __UNIFORM_RADIO_INT2 __UNIFORM_RADIO_ANY // If it was not supported in someday or now, please add information 145 #define __UNIFORM_RADIO_INT3 __UNIFORM_RADIO_ANY // If it was not supported in someday or now, please add information 146 #define __UNIFORM_RADIO_INT4 __UNIFORM_RADIO_ANY // If it was not supported in someday or now, please add information 147 #define __UNIFORM_RADIO_FLOAT1 __UNIFORM_RADIO_ANY // It is unsupported on all version 148 #define __UNIFORM_RADIO_FLOAT2 __UNIFORM_RADIO_ANY // It is unsupported on all version 149 #define __UNIFORM_RADIO_FLOAT3 __UNIFORM_RADIO_ANY // It is unsupported on all version 150 #define __UNIFORM_RADIO_FLOAT4 __UNIFORM_RADIO_ANY // It is unsupported on all version 151 152 // Since 4.1.0 153 // Fix floating point uniforms with unknown "ui_type" not showing up in UI 154 // https://github.com/crosire/reshade/commit/50e5bf44dfc84bc4220c2b9f19d5f50c7a0fda66#diff-59405a313bd8cbfb0ca6dd633230e504R1788 155 // Fixed floating point uniforms with unknown "ui_type" not showing up in UI 156 // https://reshade.me/forum/releases/5021-4-1 157 #define __UNIFORM_COLOR_ANY ui_type = "color"; 158 159 // Since 3.0.0 160 // Move technique list to preset configuration file 161 // https://github.com/crosire/reshade/blob/84bba3aa934c1ebe4c6419b69dfe1690d9ab9d34/source/runtime.cpp#L1328 162 // Added various GUI related uniform variable annotations 163 // https://reshade.me/forum/releases/2341-3-0 164 165 // If empty, these versions before 4.1.0 are decide that the type is color from the number of components 166 167 #define __UNIFORM_COLOR_BOOL1 __UNIFORM_COLOR_ANY // It is unsupported on all version 168 #define __UNIFORM_COLOR_BOOL2 __UNIFORM_COLOR_ANY // It is unsupported on all version 169 #define __UNIFORM_COLOR_BOOL3 __UNIFORM_COLOR_ANY // It is unsupported on all version 170 #define __UNIFORM_COLOR_BOOL4 __UNIFORM_COLOR_ANY // It is unsupported on all version 171 #define __UNIFORM_COLOR_INT1 __UNIFORM_COLOR_ANY // It is unsupported on all version 172 #define __UNIFORM_COLOR_INT2 __UNIFORM_COLOR_ANY // It is unsupported on all version 173 #define __UNIFORM_COLOR_INT3 __UNIFORM_COLOR_ANY // It is unsupported on all version 174 #define __UNIFORM_COLOR_INT4 __UNIFORM_COLOR_ANY // It is unsupported on all version 175 // __UNIFORM_COLOR_FLOAT1 176 #define __UNIFORM_COLOR_FLOAT2 __UNIFORM_COLOR_ANY // It is unsupported on all version 177 #define __UNIFORM_COLOR_FLOAT3 __UNIFORM_COLOR_ANY // If it was not supported in someday or now, please add information 178 #define __UNIFORM_COLOR_FLOAT4 __UNIFORM_COLOR_ANY // If it was not supported in someday or now, please add information 179 180 // Since 4.2.0 181 // Add alpha slider widget for single component uniform variables (#86) 182 // https://github.com/crosire/reshade/commit/87a740a8e3c4dcda1dd4eeec8d5cff7fa35fe829#diff-59405a313bd8cbfb0ca6dd633230e504R1820 183 // Added alpha slider widget for single component uniform variables 184 // https://reshade.me/forum/releases/5150-4-2 185 #if SUPPORTED_VERSION(4,2,0) 186 #define __UNIFORM_COLOR_FLOAT1 __UNIFORM_COLOR_ANY 187 #else 188 #define __UNIFORM_COLOR_FLOAT1 __UNIFORM_SLIDER_ANY 189 #endif 190 191 // Since 4.3.0 192 // Add new "list" GUI widget (#103) 193 // https://github.com/crosire/reshade/commit/515287d20ce615c19cf3d4c21b49f83896f04ddc#diff-59405a313bd8cbfb0ca6dd633230e504R1894 194 // Added new "list" GUI widget 195 // https://reshade.me/forum/releases/5417-4-3 196 #if SUPPORTED_VERSION(4,3,0) 197 #define __UNIFORM_LIST_ANY ui_type = "list"; 198 #else 199 #define __UNIFORM_LIST_ANY __UNIFORM_COMBO_ANY 200 #endif 201 202 // __UNIFORM_LIST_BOOL1 203 #define __UNIFORM_LIST_BOOL2 __UNIFORM_LIST_ANY // Not supported in all versions 204 #define __UNIFORM_LIST_BOOL3 __UNIFORM_LIST_ANY // Not supported in all versions 205 #define __UNIFORM_LIST_BOOL4 __UNIFORM_LIST_ANY // Not supported in all versions 206 #define __UNIFORM_LIST_INT1 __UNIFORM_LIST_ANY // Supported in 4.3.0 207 #define __UNIFORM_LIST_INT2 __UNIFORM_LIST_ANY // Not supported in all versions 208 #define __UNIFORM_LIST_INT3 __UNIFORM_LIST_ANY // Not supported in all versions 209 #define __UNIFORM_LIST_INT4 __UNIFORM_LIST_ANY // Not supported in all versions 210 #define __UNIFORM_LIST_FLOAT1 __UNIFORM_LIST_ANY // Not supported in all versions 211 #define __UNIFORM_LIST_FLOAT2 __UNIFORM_LIST_ANY // Not supported in all versions 212 #define __UNIFORM_LIST_FLOAT3 __UNIFORM_LIST_ANY // Not supported in all versions 213 #define __UNIFORM_LIST_FLOAT4 __UNIFORM_LIST_ANY // Not supported in all versions 214 215 // For compatible with ComboBox 216 #define __UNIFORM_LIST_BOOL1 __UNIFORM_COMBO_ANY