Add all uniform variables. Add find all uniform variables
This commit is contained in:
@@ -8,6 +8,18 @@ constexpr auto OSD_SHADER_NAME = "OSD.fx";
|
|||||||
using OSDUpdateFn = std::function<void(reshade::api::effect_runtime*)>;
|
using OSDUpdateFn = std::function<void(reshade::api::effect_runtime*)>;
|
||||||
using OSDEndFn = std::function<void(reshade::api::effect_runtime*)>;
|
using OSDEndFn = std::function<void(reshade::api::effect_runtime*)>;
|
||||||
|
|
||||||
|
// Reshade shader uniform variables
|
||||||
|
extern reshade::api::effect_uniform_variable u_td_show;
|
||||||
|
extern reshade::api::effect_uniform_variable u_td_enabled;
|
||||||
|
extern reshade::api::effect_uniform_variable u_td_world;
|
||||||
|
extern reshade::api::effect_uniform_variable u_td_AI;
|
||||||
|
extern reshade::api::effect_uniform_variable u_GodMode_show;
|
||||||
|
extern reshade::api::effect_uniform_variable u_GodMode_enabled;
|
||||||
|
extern reshade::api::effect_uniform_variable u_Invulnerability_show;
|
||||||
|
extern reshade::api::effect_uniform_variable u_Invulnerability_enabled;
|
||||||
|
extern reshade::api::effect_uniform_variable u_Stealth_show;
|
||||||
|
extern reshade::api::effect_uniform_variable u_Stealth_enabled;
|
||||||
|
|
||||||
extern void SetFixesEnabled(GameFixes fix, bool value);
|
extern void SetFixesEnabled(GameFixes fix, bool value);
|
||||||
extern void SaveSettings();
|
extern void SaveSettings();
|
||||||
|
|
||||||
@@ -42,6 +54,15 @@ void ShowOSD(float duration, OSDUpdateFn onUpdate, OSDEndFn onEnd);
|
|||||||
*/
|
*/
|
||||||
void UpdateOSD(reshade::api::effect_runtime* runtime, float deltaTime);
|
void UpdateOSD(reshade::api::effect_runtime* runtime, float deltaTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Find all uniform variables enumerated.
|
||||||
|
*
|
||||||
|
* This function must be called typically in `on_reshade_begin_effects`,
|
||||||
|
* @param runtime Pointer to the current `reshade::api::effect_runtime` object.
|
||||||
|
* @param effect_name File name of the effect file to enumerate uniform variables from (eg. myfile.fx)
|
||||||
|
*/
|
||||||
|
void FindAllUniformVariables(reshade::api::effect_runtime* runtime, const char* effect_name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reset all uniform variables enumerated.
|
* @brief Reset all uniform variables enumerated.
|
||||||
*
|
*
|
||||||
@@ -53,7 +74,7 @@ void UpdateOSD(reshade::api::effect_runtime* runtime, float deltaTime);
|
|||||||
void ResetAllUniformVariables(reshade::api::effect_runtime* runtime, const char* effect_name);
|
void ResetAllUniformVariables(reshade::api::effect_runtime* runtime, const char* effect_name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Toggle cheats.
|
* @brief Toggle cheats & OSD display.
|
||||||
*
|
*
|
||||||
* This function must be called once, typically in `init_effect_runtime`,
|
* This function must be called once, typically in `init_effect_runtime`,
|
||||||
* using an atomic compare-and-exchange operation
|
* using an atomic compare-and-exchange operation
|
||||||
@@ -92,4 +113,3 @@ void ToggleOSD(T& cheatEnabled, GameFixes fix,
|
|||||||
rt->set_uniform_value_bool(showUniform, false);
|
rt->set_uniform_value_bool(showUniform, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user