Reforged UI: An ENB GUI macros file
Posted: 18 Jul 2018, 00:46
Reforged UI is a macros file I made to make it much easier and quicker to add and edit UI elements for your shaders.
It also provides a seamless easy and quick way to switch between single parameters and various time of day separated parameters which are automatically interpolated, meaning you yourself don't have to do anything to get complex TOD based parameters.
For DX9 ENBs that don't have the TimeOfDay1 and TimeOfDay2 variables there is the option to recreate them using the WeatherAndTime variable, which means you can get the full time of day based functionality even in old ENBs.
For installation, just copy the Reforged folder into your ENB root directory (where your shaders are) and then include "Reforged/ReforgedUI.fxh"
Here's a quick example with code:
And here's a screenshot of my bloom's UI made with these macros:
There are a lot of features and I don't feel like covering them all in this post, but here's a list of all the available widget types and split parameter types:
If you include the tutorial file and it errors, it's probably because you're using an older ENB that doesn't have TimeOfDay variables by default, set the 0 in the line "#define DX9_ENB 0" to a 1.
Disclaimer:
Complex interpolators such as TOD based ones do have some performance impact, don't use them needlessly just for the sake of it.
It also provides a seamless easy and quick way to switch between single parameters and various time of day separated parameters which are automatically interpolated, meaning you yourself don't have to do anything to get complex TOD based parameters.
For DX9 ENBs that don't have the TimeOfDay1 and TimeOfDay2 variables there is the option to recreate them using the WeatherAndTime variable, which means you can get the full time of day based functionality even in old ENBs.
For installation, just copy the Reforged folder into your ENB root directory (where your shaders are) and then include "Reforged/ReforgedUI.fxh"
Here's a quick example with code:
Code: Select all
// ...start somewhere AFTER external variables (ENightDayFactor, TimeOfDay1/2 or WeatherAndTime, etc) have been defined
#include "Reforged/ReforgedUI.fxh"
#define UI_CATEGORY Example
UI_SEPARATOR
UI_FLOAT(ExampleFloat, "Example Float", 0.0, 1.0, 0.0)
UI_WHITESPACE(1)
#define UI_PREFIX_MODE PREFIX
UI_FLOAT(ExampleFloat2, "Float w/ Prefix", 0.0, 1.0, 0.0)
UI_WHITESPACE(2)
#define UI_PREFIX_MODE NO_PREFIX
UI_FLOAT_TODI(ExampleFloat3, "Example TOD/I float", 0.0, 1.0, 0.0)
// ^^ ExampleFloat3 can be used as any other variable, the interpolation happens behind the scenes
And here's a screenshot of my bloom's UI made with these macros:
There are a lot of features and I don't feel like covering them all in this post, but here's a list of all the available widget types and split parameter types:
For a full rundown of the features and how to use them, check out the ReforgedUITutorial.fxh file (try including it in a shader and look at the result).Widgets:
UI_BOOL(variable name, ui name, default value)
UI_INT(variable name, ui name, minimum value, maximum value, default value)
UI_QUALITY(variable name, ui name, minimum value, maximum value, default value)
UI_FLOAT(variable name, ui name, minimum value, maximum value, default value)
UI_FLOAT_FINE(variable name, ui name, minimum value, maximum value, default value, step size)
UI_FLOAT3(variable name, ui name, default red, default green, default blue)
UI_FLOAT4(variable name, ui name, default x, default y, default z, default w)
Split Parameter Types:
SINGLE (it's just the one parameter)
EI (Exterior/Interior)
DNI / DN_I (Day/Night/Interior)
DNE_DNI (Exterior: Day/Night, Interior: Day/Night)
TODI / TOD_I (Dawn/Sunrise/Day/Dusk/Sunset/Night/Interior)
TODE_DNI (Exterior: Dawn/Sunrise/Day/Dusk/Sunset/Night, Interior: Day/Night)
TODE_TODI (Separate Exterior and Interior TOD parameters)
If you include the tutorial file and it errors, it's probably because you're using an older ENB that doesn't have TimeOfDay variables by default, set the 0 in the line "#define DX9_ENB 0" to a 1.
Disclaimer:
Complex interpolators such as TOD based ones do have some performance impact, don't use them needlessly just for the sake of it.