ReShade
A generic post-processing injector for games and video software.
Public Member Functions | List of all members
reshade::api::effect_runtime Struct Referenceabstract

A post-processing effect runtime, used to control effects. More...

#include <reshade_api.hpp>

Inheritance diagram for reshade::api::effect_runtime:
reshade::api::device_object reshade::api::api_object

Public Member Functions

virtual void * get_hwnd () const =0
 Gets the handle of the window associated with this effect runtime. More...
 
virtual resource get_back_buffer (uint32_t index)=0
 Gets the back buffer resource at the specified index in the swap chain associated with this effect runtime. More...
 
virtual uint32_t get_back_buffer_count () const =0
 Gets the number of back buffer resources in the swap chain associated with this effect runtime. More...
 
resource get_current_back_buffer ()
 Gets the current back buffer resource. More...
 
virtual uint32_t get_current_back_buffer_index () const =0
 Gets the index of the back buffer resource that can currently be rendered into. More...
 
virtual command_queueget_command_queue ()=0
 Gets the main graphics command queue associated with this effect runtime. This may potentially be different from the presentation queue and should be used to execute graphics commands on. More...
 
virtual void render_effects (command_list *cmd_list, resource_view rtv, resource_view rtv_srgb)=0
 Applies post-processing effects to the specified render targets and prevents the usual rendering of effects before swap chain presentation of the current frame. This can be used to force ReShade to render effects at a certain point during the frame to e.g. avoid effects being applied to user interface elements of the application. More...
 
virtual bool capture_screenshot (void *pixels)=0
 Captures a screenshot of the current back buffer resource and returns its image data. More...
 
virtual void get_screenshot_width_and_height (uint32_t *out_width, uint32_t *out_height) const =0
 Gets the current buffer dimensions of the swap chain. More...
 
virtual bool is_key_down (uint32_t keycode) const =0
 Gets the current status of the specified key. More...
 
virtual bool is_key_pressed (uint32_t keycode) const =0
 Gets whether the specified key was pressed this frame. More...
 
virtual bool is_key_released (uint32_t keycode) const =0
 Gets whether the specified key was released this frame. More...
 
virtual bool is_mouse_button_down (uint32_t button) const =0
 Gets the current status of the specified mouse button. More...
 
virtual bool is_mouse_button_pressed (uint32_t button) const =0
 Gets whether the specified mouse button was pressed this frame. More...
 
virtual bool is_mouse_button_released (uint32_t button) const =0
 Gets whether the specified mouse button was released this frame. More...
 
virtual void get_mouse_cursor_position (uint32_t *out_x, uint32_t *out_y, int16_t *out_wheel_delta=nullptr) const =0
 Gets the current absolute position of the mouse cursor in screen coordinates. More...
 
virtual void enumerate_uniform_variables (const char *effect_name, void(*callback)(effect_runtime *runtime, effect_uniform_variable variable, void *user_data), void *user_data)=0
 Enumerates all uniform variables of loaded effects and calls the specified callback function with a handle for each one. More...
 
template<typename F >
void enumerate_uniform_variables (const char *effect_name, F lambda)
 Enumerates all uniform variables of loaded effects and calls the specified callback function with a handle for each one. More...
 
virtual effect_uniform_variable find_uniform_variable (const char *effect_name, const char *variable_name) const =0
 Finds a specific uniform variable in the loaded effects and returns a handle to it. More...
 
virtual void get_uniform_variable_type (effect_uniform_variable variable, format *out_base_type, uint32_t *out_rows=nullptr, uint32_t *out_columns=nullptr, uint32_t *out_array_length=nullptr) const =0
 Gets information about the data type of a uniform variable . More...
 
virtual void get_uniform_variable_name (effect_uniform_variable variable, char *name, size_t *name_size) const =0
 Gets the name of a uniform variable . More...
 
template<size_t SIZE>
void get_uniform_variable_name (effect_uniform_variable variable, char(&name)[SIZE]) const
 
virtual bool get_annotation_bool_from_uniform_variable (effect_uniform_variable variable, const char *name, bool *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified uniform variable as boolean values. More...
 
virtual bool get_annotation_float_from_uniform_variable (effect_uniform_variable variable, const char *name, float *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified uniform variable as floating-point values. More...
 
virtual bool get_annotation_int_from_uniform_variable (effect_uniform_variable variable, const char *name, int32_t *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified uniform variable as signed integer values. More...
 
virtual bool get_annotation_uint_from_uniform_variable (effect_uniform_variable variable, const char *name, uint32_t *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified uniform variable as unsigned integer values. More...
 
virtual bool get_annotation_string_from_uniform_variable (effect_uniform_variable variable, const char *name, char *value, size_t *value_size) const =0
 Gets the value from a string annotation attached to the specified uniform variable . More...
 
template<size_t SIZE>
bool get_annotation_string_from_uniform_variable (effect_uniform_variable variable, const char *name, char(&value)[SIZE]) const
 
virtual void get_uniform_value_bool (effect_uniform_variable variable, bool *values, size_t count, size_t array_index=0) const =0
 Gets the value of the specified uniform variable as boolean values. More...
 
virtual void get_uniform_value_float (effect_uniform_variable variable, float *values, size_t count, size_t array_index=0) const =0
 Gets the value of the specified uniform variable as floating-point values. More...
 
virtual void get_uniform_value_int (effect_uniform_variable variable, int32_t *values, size_t count, size_t array_index=0) const =0
 Gets the value of the specified uniform variable as signed integer values. More...
 
virtual void get_uniform_value_uint (effect_uniform_variable variable, uint32_t *values, size_t count, size_t array_index=0) const =0
 Gets the value of the specified uniform variable as unsigned integer values. More...
 
virtual void set_uniform_value_bool (effect_uniform_variable variable, const bool *values, size_t count, size_t array_index=0)=0
 Sets the value of the specified uniform variable as boolean values. More...
 
void set_uniform_value_bool (effect_uniform_variable variable, bool x, bool y=bool(0), bool z=bool(0), bool w=bool(0))
 Sets the value of the specified uniform variable as a vector of boolean values. More...
 
virtual void set_uniform_value_float (effect_uniform_variable variable, const float *values, size_t count, size_t array_index=0)=0
 Sets the value of the specified uniform variable as floating-point values. More...
 
void set_uniform_value_float (effect_uniform_variable variable, float x, float y=float(0), float z=float(0), float w=float(0))
 Sets the value of the specified uniform variable as a vector of floating-point values. More...
 
virtual void set_uniform_value_int (effect_uniform_variable variable, const int32_t *values, size_t count, size_t array_index=0)=0
 Sets the value of the specified uniform variable as signed integer values. More...
 
void set_uniform_value_int (effect_uniform_variable variable, int32_t x, int32_t y=int32_t(0), int32_t z=int32_t(0), int32_t w=int32_t(0))
 Sets the value of the specified uniform variable as a vector of signed integer values. More...
 
virtual void set_uniform_value_uint (effect_uniform_variable variable, const uint32_t *values, size_t count, size_t array_index=0)=0
 Sets the value of the specified uniform variable as unsigned integer values. More...
 
void set_uniform_value_uint (effect_uniform_variable variable, uint32_t x, uint32_t y=uint32_t(0), uint32_t z=uint32_t(0), uint32_t w=uint32_t(0))
 Sets the value of the specified uniform variable as a vector of unsigned integer values. More...
 
virtual void enumerate_texture_variables (const char *effect_name, void(*callback)(effect_runtime *runtime, effect_texture_variable variable, void *user_data), void *user_data)=0
 Enumerates all texture variables of loaded effects and calls the specified callback function with a handle for each one. More...
 
template<typename F >
void enumerate_texture_variables (const char *effect_name, F lambda)
 Enumerates all texture variables of loaded effects and calls the specified callback function with a handle for each one. More...
 
virtual effect_texture_variable find_texture_variable (const char *effect_name, const char *variable_name) const =0
 Finds a specific texture variable in the loaded effects and returns a handle to it. More...
 
virtual void get_texture_variable_name (effect_texture_variable variable, char *name, size_t *name_size) const =0
 Gets the name of a texture variable . More...
 
template<size_t SIZE>
void get_texture_variable_name (effect_texture_variable variable, char(&name)[SIZE]) const
 
virtual bool get_annotation_bool_from_texture_variable (effect_texture_variable variable, const char *name, bool *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified texture variable as boolean values. More...
 
virtual bool get_annotation_float_from_texture_variable (effect_texture_variable variable, const char *name, float *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified texture variable as floating-point values. More...
 
virtual bool get_annotation_int_from_texture_variable (effect_texture_variable variable, const char *name, int32_t *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified texture variable as signed integer values. More...
 
virtual bool get_annotation_uint_from_texture_variable (effect_texture_variable variable, const char *name, uint32_t *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified texture variable as unsigned integer values. More...
 
virtual bool get_annotation_string_from_texture_variable (effect_texture_variable variable, const char *name, char *value, size_t *value_size) const =0
 Gets the value from a string annotation attached to the specified texture variable . More...
 
template<size_t SIZE>
bool get_annotation_string_from_texture_variable (effect_texture_variable variable, const char *name, char(&value)[SIZE]) const
 
virtual void update_texture (effect_texture_variable variable, const uint32_t width, const uint32_t height, const void *pixels)=0
 Uploads image data to the specified texture variable . More...
 
virtual void get_texture_binding (effect_texture_variable variable, resource_view *out_srv, resource_view *out_srv_srgb) const =0
 Gets the shader resource view that is bound to the specified texture variable . More...
 
virtual void update_texture_bindings (const char *semantic, resource_view srv, resource_view srv_srgb)=0
 Binds new shader resource views to all texture variables that use the specified semantic . More...
 
virtual void enumerate_techniques (const char *effect_name, void(*callback)(effect_runtime *runtime, effect_technique technique, void *user_data), void *user_data)=0
 Enumerates all techniques of loaded effects and calls the specified callback function with a handle for each one. More...
 
template<typename F >
void enumerate_techniques (const char *effect_name, F lambda)
 Enumerates all techniques of loaded effects and calls the specified callback function with a handle for each one. More...
 
virtual effect_technique find_technique (const char *effect_name, const char *technique_name)=0
 Finds a specific technique in the loaded effects and returns a handle to it. More...
 
virtual void get_technique_name (effect_technique technique, char *name, size_t *name_size) const =0
 Gets the name of a technique . More...
 
template<size_t SIZE>
void get_technique_name (effect_technique technique, char(&name)[SIZE]) const
 
virtual bool get_annotation_bool_from_technique (effect_technique technique, const char *name, bool *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified technique as boolean values. More...
 
virtual bool get_annotation_float_from_technique (effect_technique technique, const char *name, float *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified technique as floating-point values. More...
 
virtual bool get_annotation_int_from_technique (effect_technique technique, const char *name, int32_t *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified technique as signed integer values. More...
 
virtual bool get_annotation_uint_from_technique (effect_technique technique, const char *name, uint32_t *values, size_t count, size_t array_index=0) const =0
 Gets the value from an annotation attached to the specified technique as unsigned integer values. More...
 
virtual bool get_annotation_string_from_technique (effect_technique technique, const char *name, char *value, size_t *value_size) const =0
 Gets the value from a string annotation attached to the specified technique . More...
 
template<size_t SIZE>
bool get_annotation_string_from_technique (effect_technique technique, const char *name, char(&value)[SIZE]) const
 
virtual bool get_technique_state (effect_technique technique) const =0
 Gets the state of a technique . More...
 
virtual void set_technique_state (effect_technique technique, bool enabled)=0
 Enables or disables the specified technique . More...
 
virtual bool get_preprocessor_definition (const char *name, char *value, size_t *value_size) const =0
 Gets the value of a preprocessor definition. More...
 
template<size_t SIZE>
bool get_preprocessor_definition (const char *name, char(&value)[SIZE]) const
 
virtual void set_preprocessor_definition (const char *name, const char *value)=0
 Defines a preprocessor definition to the specified value . More...
 
virtual void render_technique (effect_technique technique, command_list *cmd_list, resource_view rtv, resource_view rtv_srgb={ 0 })=0
 Applies a technique to the specified render targets (regardless of the state of this technique). More...
 
virtual bool get_effects_state () const =0
 Gets whether rendering of effects is enabled or disabled. More...
 
virtual void set_effects_state (bool enabled)=0
 Enables or disables all effects. More...
 
virtual void get_current_preset_path (char *path, size_t *path_size) const =0
 Gets the file path to the currently active preset. More...
 
template<size_t SIZE>
void get_current_preset_path (char(&path)[SIZE]) const
 
virtual void set_current_preset_path (const char *path)=0
 Saves the currently active preset and then switches to the specified new preset. More...
 
virtual void reorder_techniques (size_t count, const effect_technique *techniques)=0
 Changes the rendering order of loaded techniques to that of the specified technique list. More...
 
virtual void block_input_next_frame ()=0
 Makes ReShade block any keyboard and mouse input from reaching the game for the duration of the next frame. Call this every frame for as long as input should be blocked. This can be used to ensure input is only applied to overlays created in a addon_event::reshade_overlay callback. More...
 
virtual uint32_t last_key_pressed () const =0
 Gets the virtual key code of the last key that was pressed. More...
 
virtual uint32_t last_key_released () const =0
 Gets the virtual key code of the last key that was released. More...
 
virtual void get_uniform_variable_effect_name (effect_uniform_variable variable, char *effect_name, size_t *effect_name_size) const =0
 Gets the effect file name of a uniform variable . More...
 
template<size_t SIZE>
void get_uniform_variable_effect_name (effect_uniform_variable variable, char(&effect_name)[SIZE]) const
 
virtual void get_texture_variable_effect_name (effect_texture_variable variable, char *effect_name, size_t *effect_name_size) const =0
 Gets the effect file name of a texture variable . More...
 
template<size_t SIZE>
void get_texture_variable_effect_name (effect_texture_variable variable, char(&effect_name)[SIZE]) const
 
virtual void get_technique_effect_name (effect_technique technique, char *effect_name, size_t *effect_name_size) const =0
 Gets the effect file name of a technique . More...
 
template<size_t SIZE>
void get_technique_effect_name (effect_technique technique, char(&effect_name)[SIZE]) const
 
virtual void save_current_preset () const =0
 Saves the current preset with the current state of the loaded techniques and uniform variables. More...
 
virtual bool get_preprocessor_definition_for_effect (const char *effect_name, const char *name, char *value, size_t *value_size) const =0
 Gets the value of a preprocessor definition for the specified effect. More...
 
template<size_t SIZE>
bool get_preprocessor_definition_for_effect (const char *effect_name, const char *name, char(&value)[SIZE]) const
 
virtual void set_preprocessor_definition_for_effect (const char *effect_name, const char *name, const char *value)=0
 Defines a preprocessor definition for the specified effect to the specified value . More...
 
virtual bool open_overlay (bool open, input_source source)=0
 Open or close the ReShade overlay. More...
 
virtual void set_color_space (color_space color_space)=0
 Overrides the color space used for presentation. More...
 
virtual void reset_uniform_value (effect_uniform_variable variable)=0
 Resets the value of the specified uniform variable . More...
 
virtual void reload_effect_next_frame (const char *effect_name)=0
 Queues up the specified effect for reloading in the next frame. This can be called multiple times with different effects to append to the queue. More...
 
- Public Member Functions inherited from reshade::api::device_object
virtual deviceget_device ()=0
 Gets the parent device for this object. More...
 
- Public Member Functions inherited from reshade::api::api_object
virtual uint64_t get_native () const =0
 Gets the underlying native object for this API object. More...
 
virtual void get_private_data (const uint8_t guid[16], uint64_t *data) const =0
 Gets a user-defined 64-bit value from the object that was previously set via set_private_data, or zero if none associated with the specified guid exists. More...
 
virtual void set_private_data (const uint8_t guid[16], const uint64_t data)=0
 Stores a user-defined 64-bit value in the object and associates it with the specified guid . More...
 
template<typename T >
T & get_private_data () const
 Gets a reference to user-defined data from the object that was previously allocated via create_private_data. More...
 
template<typename T , typename... Args>
T & create_private_data (Args &&... args)
 Allocates user-defined data and stores it in the object. More...
 
template<typename T >
void destroy_private_data ()
 Frees user-defined data that was previously allocated via create_private_data. More...
 

Detailed Description

A post-processing effect runtime, used to control effects.

ReShade associates an independent post-processing effect runtime with most swap chains.

Member Function Documentation

◆ block_input_next_frame()

virtual void reshade::api::effect_runtime::block_input_next_frame ( )
pure virtual

Makes ReShade block any keyboard and mouse input from reaching the game for the duration of the next frame. Call this every frame for as long as input should be blocked. This can be used to ensure input is only applied to overlays created in a addon_event::reshade_overlay callback.

◆ capture_screenshot()

virtual bool reshade::api::effect_runtime::capture_screenshot ( void *  pixels)
pure virtual

Captures a screenshot of the current back buffer resource and returns its image data.

Parameters
pixelsPointer to an array of width * height * bpp bytes the image data is written to (where bpp is the number of bytes per pixel of the back buffer format).

◆ enumerate_techniques() [1/2]

template<typename F >
void reshade::api::effect_runtime::enumerate_techniques ( const char *  effect_name,
lambda 
)
inline

Enumerates all techniques of loaded effects and calls the specified callback function with a handle for each one.

Parameters
effect_nameFile name of the effect file to enumerate techniques from, or nullptr to enumerate those of all loaded effects.
lambdaFunction to call for every technique.

◆ enumerate_techniques() [2/2]

virtual void reshade::api::effect_runtime::enumerate_techniques ( const char *  effect_name,
void(*)(effect_runtime *runtime, effect_technique technique, void *user_data)  callback,
void *  user_data 
)
pure virtual

Enumerates all techniques of loaded effects and calls the specified callback function with a handle for each one.

Parameters
effect_nameFile name of the effect file to enumerate techniques from, or nullptr to enumerate those of all loaded effects.
callbackFunction to call for every technique.
user_dataOptional pointer passed to the callback function.

◆ enumerate_texture_variables() [1/2]

template<typename F >
void reshade::api::effect_runtime::enumerate_texture_variables ( const char *  effect_name,
lambda 
)
inline

Enumerates all texture variables of loaded effects and calls the specified callback function with a handle for each one.

Parameters
effect_nameFile name of the effect file to enumerate texture variables from, or nullptr to enumerate those of all loaded effects.
lambdaFunction to call for every texture variable.

◆ enumerate_texture_variables() [2/2]

virtual void reshade::api::effect_runtime::enumerate_texture_variables ( const char *  effect_name,
void(*)(effect_runtime *runtime, effect_texture_variable variable, void *user_data)  callback,
void *  user_data 
)
pure virtual

Enumerates all texture variables of loaded effects and calls the specified callback function with a handle for each one.

Parameters
effect_nameFile name of the effect file to enumerate texture variables from, or nullptr to enumerate those of all loaded effects.
callbackFunction to call for every texture variable.
user_dataOptional pointer passed to the callback function.

◆ enumerate_uniform_variables() [1/2]

template<typename F >
void reshade::api::effect_runtime::enumerate_uniform_variables ( const char *  effect_name,
lambda 
)
inline

Enumerates all uniform variables of loaded effects and calls the specified callback function with a handle for each one.

Parameters
effect_nameFile name of the effect file to enumerate uniform variables from, or nullptr to enumerate those of all loaded effects.
lambdaFunction to call for every uniform variable.

◆ enumerate_uniform_variables() [2/2]

virtual void reshade::api::effect_runtime::enumerate_uniform_variables ( const char *  effect_name,
void(*)(effect_runtime *runtime, effect_uniform_variable variable, void *user_data)  callback,
void *  user_data 
)
pure virtual

Enumerates all uniform variables of loaded effects and calls the specified callback function with a handle for each one.

Parameters
effect_nameFile name of the effect file to enumerate uniform variables from, or nullptr to enumerate those of all loaded effects.
callbackFunction to call for every uniform variable.
user_dataOptional pointer passed to the callback function.

◆ find_technique()

virtual effect_technique reshade::api::effect_runtime::find_technique ( const char *  effect_name,
const char *  technique_name 
)
pure virtual

Finds a specific technique in the loaded effects and returns a handle to it.

Parameters
effect_nameFile name of the effect file the technique is declared in, or nullptr to search in all loaded effects.
technique_nameName of the technique to find.
Returns
Opaque handle to the technique, or zero in case it was not found.

◆ find_texture_variable()

virtual effect_texture_variable reshade::api::effect_runtime::find_texture_variable ( const char *  effect_name,
const char *  variable_name 
) const
pure virtual

Finds a specific texture variable in the loaded effects and returns a handle to it.

Parameters
effect_nameFile name of the effect file the variable is declared in, or nullptr to search in all loaded effects.
variable_nameName of the texture variable declaration to find.
Returns
Opaque handle to the texture variable, or zero in case it was not found.

◆ find_uniform_variable()

virtual effect_uniform_variable reshade::api::effect_runtime::find_uniform_variable ( const char *  effect_name,
const char *  variable_name 
) const
pure virtual

Finds a specific uniform variable in the loaded effects and returns a handle to it.

Parameters
effect_nameFile name of the effect file the variable is declared in, or nullptr to search in all loaded effects.
variable_nameName of the uniform variable declaration to find.
Returns
Opaque handle to the uniform variable, or zero in case it was not found.

This will not find uniform variables when performance mode is enabled, since in that case uniform variables are replaced with constants during effect compilation.

◆ get_annotation_bool_from_technique()

virtual bool reshade::api::effect_runtime::get_annotation_bool_from_technique ( effect_technique  technique,
const char *  name,
bool *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified technique as boolean values.

Parameters
techniqueOpaque handle to the technique.
nameName of the annotation.
valuesPointer to an array of booleans that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the technique, false otherwise.

◆ get_annotation_bool_from_texture_variable()

virtual bool reshade::api::effect_runtime::get_annotation_bool_from_texture_variable ( effect_texture_variable  variable,
const char *  name,
bool *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified texture variable as boolean values.

Parameters
variableOpaque handle to the texture variable.
nameName of the annotation.
valuesPointer to an array of booleans that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the texture variable, false otherwise.

◆ get_annotation_bool_from_uniform_variable()

virtual bool reshade::api::effect_runtime::get_annotation_bool_from_uniform_variable ( effect_uniform_variable  variable,
const char *  name,
bool *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified uniform variable as boolean values.

Parameters
variableOpaque handle to the uniform variable.
nameName of the annotation.
valuesPointer to an array of booleans that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the uniform variable, false otherwise.

◆ get_annotation_float_from_technique()

virtual bool reshade::api::effect_runtime::get_annotation_float_from_technique ( effect_technique  technique,
const char *  name,
float *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified technique as floating-point values.

Parameters
techniqueOpaque handle to the technique.
nameName of the annotation.
valuesPointer to an array of floating-points that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the technique, false otherwise.

◆ get_annotation_float_from_texture_variable()

virtual bool reshade::api::effect_runtime::get_annotation_float_from_texture_variable ( effect_texture_variable  variable,
const char *  name,
float *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified texture variable as floating-point values.

Parameters
variableOpaque handle to the texture variable.
nameName of the annotation.
valuesPointer to an array of floating-points that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the texture variable, false otherwise.

◆ get_annotation_float_from_uniform_variable()

virtual bool reshade::api::effect_runtime::get_annotation_float_from_uniform_variable ( effect_uniform_variable  variable,
const char *  name,
float *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified uniform variable as floating-point values.

Parameters
variableOpaque handle to the uniform variable.
nameName of the annotation.
valuesPointer to an array of floating-points that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the uniform variable, false otherwise.

◆ get_annotation_int_from_technique()

virtual bool reshade::api::effect_runtime::get_annotation_int_from_technique ( effect_technique  technique,
const char *  name,
int32_t *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified technique as signed integer values.

Parameters
techniqueOpaque handle to the technique.
nameName of the annotation.
valuesPointer to an array of signed integers that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the technique, false otherwise.

◆ get_annotation_int_from_texture_variable()

virtual bool reshade::api::effect_runtime::get_annotation_int_from_texture_variable ( effect_texture_variable  variable,
const char *  name,
int32_t *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified texture variable as signed integer values.

Parameters
variableOpaque handle to the texture variable.
nameName of the annotation.
valuesPointer to an array of signed integers that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the texture variable, false otherwise.

◆ get_annotation_int_from_uniform_variable()

virtual bool reshade::api::effect_runtime::get_annotation_int_from_uniform_variable ( effect_uniform_variable  variable,
const char *  name,
int32_t *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified uniform variable as signed integer values.

Parameters
variableOpaque handle to the uniform variable.
nameName of the annotation.
valuesPointer to an array of signed integers that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the uniform variable, false otherwise.

◆ get_annotation_string_from_technique() [1/2]

virtual bool reshade::api::effect_runtime::get_annotation_string_from_technique ( effect_technique  technique,
const char *  name,
char *  value,
size_t *  value_size 
) const
pure virtual

Gets the value from a string annotation attached to the specified technique .

Parameters
techniqueOpaque handle to the technique.
nameName of the annotation.
valuePointer to a string buffer that is filled with the value of the annotation, or nullptr to query the necessary size.
value_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.
Returns
true if the annotation exists on the technique, false otherwise.

◆ get_annotation_string_from_technique() [2/2]

template<size_t SIZE>
bool reshade::api::effect_runtime::get_annotation_string_from_technique ( effect_technique  technique,
const char *  name,
char(&)  value[SIZE] 
) const
inline

◆ get_annotation_string_from_texture_variable() [1/2]

virtual bool reshade::api::effect_runtime::get_annotation_string_from_texture_variable ( effect_texture_variable  variable,
const char *  name,
char *  value,
size_t *  value_size 
) const
pure virtual

Gets the value from a string annotation attached to the specified texture variable .

Parameters
variableOpaque handle to the texture variable.
nameName of the annotation.
valuePointer to a string buffer that is filled with the value of the annotation, or nullptr to query the necessary size.
value_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.
Returns
true if the annotation exists on the texture variable, false otherwise.

◆ get_annotation_string_from_texture_variable() [2/2]

template<size_t SIZE>
bool reshade::api::effect_runtime::get_annotation_string_from_texture_variable ( effect_texture_variable  variable,
const char *  name,
char(&)  value[SIZE] 
) const
inline

◆ get_annotation_string_from_uniform_variable() [1/2]

virtual bool reshade::api::effect_runtime::get_annotation_string_from_uniform_variable ( effect_uniform_variable  variable,
const char *  name,
char *  value,
size_t *  value_size 
) const
pure virtual

Gets the value from a string annotation attached to the specified uniform variable .

Parameters
variableOpaque handle to the uniform variable.
nameName of the annotation.
valuePointer to a string buffer that is filled with the value of the annotation, or nullptr to query the necessary size.
value_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.
Returns
true if the annotation exists on the uniform variable, false otherwise.

◆ get_annotation_string_from_uniform_variable() [2/2]

template<size_t SIZE>
bool reshade::api::effect_runtime::get_annotation_string_from_uniform_variable ( effect_uniform_variable  variable,
const char *  name,
char(&)  value[SIZE] 
) const
inline

◆ get_annotation_uint_from_technique()

virtual bool reshade::api::effect_runtime::get_annotation_uint_from_technique ( effect_technique  technique,
const char *  name,
uint32_t *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified technique as unsigned integer values.

Parameters
techniqueOpaque handle to the technique.
nameName of the annotation.
valuesPointer to an array of unsigned integers that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the technique, false otherwise.

◆ get_annotation_uint_from_texture_variable()

virtual bool reshade::api::effect_runtime::get_annotation_uint_from_texture_variable ( effect_texture_variable  variable,
const char *  name,
uint32_t *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified texture variable as unsigned integer values.

Parameters
variableOpaque handle to the texture variable.
nameName of the annotation.
valuesPointer to an array of unsigned integers that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the texture variable, false otherwise.

◆ get_annotation_uint_from_uniform_variable()

virtual bool reshade::api::effect_runtime::get_annotation_uint_from_uniform_variable ( effect_uniform_variable  variable,
const char *  name,
uint32_t *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value from an annotation attached to the specified uniform variable as unsigned integer values.

Parameters
variableOpaque handle to the uniform variable.
nameName of the annotation.
valuesPointer to an array of unsigned integers that is filled with the values of the annotation.
countNumber of values to read.
array_indexArray offset to start reading values from when the annotation is an array.
Returns
true if the annotation exists on the uniform variable, false otherwise.

◆ get_back_buffer()

virtual resource reshade::api::effect_runtime::get_back_buffer ( uint32_t  index)
pure virtual

Gets the back buffer resource at the specified index in the swap chain associated with this effect runtime.

Parameters
indexIndex of the back buffer. This has to be between zero and the value returned by get_back_buffer_count.

◆ get_back_buffer_count()

virtual uint32_t reshade::api::effect_runtime::get_back_buffer_count ( ) const
pure virtual

Gets the number of back buffer resources in the swap chain associated with this effect runtime.

◆ get_command_queue()

virtual command_queue* reshade::api::effect_runtime::get_command_queue ( )
pure virtual

Gets the main graphics command queue associated with this effect runtime. This may potentially be different from the presentation queue and should be used to execute graphics commands on.

◆ get_current_back_buffer()

resource reshade::api::effect_runtime::get_current_back_buffer ( )
inline

Gets the current back buffer resource.

◆ get_current_back_buffer_index()

virtual uint32_t reshade::api::effect_runtime::get_current_back_buffer_index ( ) const
pure virtual

Gets the index of the back buffer resource that can currently be rendered into.

◆ get_current_preset_path() [1/2]

virtual void reshade::api::effect_runtime::get_current_preset_path ( char *  path,
size_t *  path_size 
) const
pure virtual

Gets the file path to the currently active preset.

Parameters
pathPointer to a string buffer that is filled with the file path to the preset, or nullptr to query the necessary size.
path_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.

◆ get_current_preset_path() [2/2]

template<size_t SIZE>
void reshade::api::effect_runtime::get_current_preset_path ( char(&)  path[SIZE]) const
inline

◆ get_effects_state()

virtual bool reshade::api::effect_runtime::get_effects_state ( ) const
pure virtual

Gets whether rendering of effects is enabled or disabled.

◆ get_hwnd()

virtual void* reshade::api::effect_runtime::get_hwnd ( ) const
pure virtual

Gets the handle of the window associated with this effect runtime.

◆ get_mouse_cursor_position()

virtual void reshade::api::effect_runtime::get_mouse_cursor_position ( uint32_t *  out_x,
uint32_t *  out_y,
int16_t *  out_wheel_delta = nullptr 
) const
pure virtual

Gets the current absolute position of the mouse cursor in screen coordinates.

Parameters
out_xPointer to a variable that is set to the X coordinate of the current cursor position.
out_yPointer to a variable that is set to the Y coordinate of the current cursor position.
out_wheel_deltaOptional pointer to a variable that is set to the mouse wheel delta since the last frame.

◆ get_preprocessor_definition() [1/2]

virtual bool reshade::api::effect_runtime::get_preprocessor_definition ( const char *  name,
char *  value,
size_t *  value_size 
) const
pure virtual

Gets the value of a preprocessor definition.

Parameters
nameName of the definition.
valuePointer to a string buffer that is filled with the value of the definition, or nullptr to query the necessary size.
value_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.
Returns
true if the preprocessor definition is defined, false otherwise.

◆ get_preprocessor_definition() [2/2]

template<size_t SIZE>
bool reshade::api::effect_runtime::get_preprocessor_definition ( const char *  name,
char(&)  value[SIZE] 
) const
inline

◆ get_preprocessor_definition_for_effect() [1/2]

virtual bool reshade::api::effect_runtime::get_preprocessor_definition_for_effect ( const char *  effect_name,
const char *  name,
char *  value,
size_t *  value_size 
) const
pure virtual

Gets the value of a preprocessor definition for the specified effect.

Parameters
effect_nameFile name of the effect file the preprocessor definition is defined for.
nameName of the definition.
valuePointer to a string buffer that is filled with the value of the definition, or nullptr to query the necessary size.
value_sizePointer to an integer that contains the size of the string buffer and upon completion is set to the actual length of the string, including the null-terminator.
Returns
true if the preprocessor definition is defined, false otherwise.

◆ get_preprocessor_definition_for_effect() [2/2]

template<size_t SIZE>
bool reshade::api::effect_runtime::get_preprocessor_definition_for_effect ( const char *  effect_name,
const char *  name,
char(&)  value[SIZE] 
) const
inline

◆ get_screenshot_width_and_height()

virtual void reshade::api::effect_runtime::get_screenshot_width_and_height ( uint32_t *  out_width,
uint32_t *  out_height 
) const
pure virtual

Gets the current buffer dimensions of the swap chain.

◆ get_technique_effect_name() [1/2]

virtual void reshade::api::effect_runtime::get_technique_effect_name ( effect_technique  technique,
char *  effect_name,
size_t *  effect_name_size 
) const
pure virtual

Gets the effect file name of a technique .

Parameters
techniqueOpaque handle to the technique.
effect_namePointer to a string buffer that is filled with the effect file name of the technique, or nullptr to query the necessary size.
effect_name_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.

◆ get_technique_effect_name() [2/2]

template<size_t SIZE>
void reshade::api::effect_runtime::get_technique_effect_name ( effect_technique  technique,
char(&)  effect_name[SIZE] 
) const
inline

◆ get_technique_name() [1/2]

virtual void reshade::api::effect_runtime::get_technique_name ( effect_technique  technique,
char *  name,
size_t *  name_size 
) const
pure virtual

Gets the name of a technique .

Parameters
techniqueOpaque handle to the technique.
namePointer to a string buffer that is filled with the name of the technique, or nullptr to query the necessary size.
name_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.

◆ get_technique_name() [2/2]

template<size_t SIZE>
void reshade::api::effect_runtime::get_technique_name ( effect_technique  technique,
char(&)  name[SIZE] 
) const
inline

◆ get_technique_state()

virtual bool reshade::api::effect_runtime::get_technique_state ( effect_technique  technique) const
pure virtual

Gets the state of a technique .

Parameters
techniqueOpaque handle to the technique.
Returns
true if the technique is enabled, or false if it is disabled.

◆ get_texture_binding()

virtual void reshade::api::effect_runtime::get_texture_binding ( effect_texture_variable  variable,
resource_view out_srv,
resource_view out_srv_srgb 
) const
pure virtual

Gets the shader resource view that is bound to the specified texture variable .

Parameters
variableOpaque handle to the texture variable.
out_srvPointer to a variable that is set to the shader resource view.
out_srv_srgbPointer to a variable that is set to the sRGB shader resource view.

◆ get_texture_variable_effect_name() [1/2]

virtual void reshade::api::effect_runtime::get_texture_variable_effect_name ( effect_texture_variable  variable,
char *  effect_name,
size_t *  effect_name_size 
) const
pure virtual

Gets the effect file name of a texture variable .

Parameters
variableOpaque handle to the texture variable.
effect_namePointer to a string buffer that is filled with the effect file name of the texture variable, or nullptr to query the necessary size.
effect_name_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.

◆ get_texture_variable_effect_name() [2/2]

template<size_t SIZE>
void reshade::api::effect_runtime::get_texture_variable_effect_name ( effect_texture_variable  variable,
char(&)  effect_name[SIZE] 
) const
inline

◆ get_texture_variable_name() [1/2]

virtual void reshade::api::effect_runtime::get_texture_variable_name ( effect_texture_variable  variable,
char *  name,
size_t *  name_size 
) const
pure virtual

Gets the name of a texture variable .

Parameters
variableOpaque handle to the texture variable.
namePointer to a string buffer that is filled with the name of the texture variable, or nullptr to query the necessary size.
name_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.

◆ get_texture_variable_name() [2/2]

template<size_t SIZE>
void reshade::api::effect_runtime::get_texture_variable_name ( effect_texture_variable  variable,
char(&)  name[SIZE] 
) const
inline

◆ get_uniform_value_bool()

virtual void reshade::api::effect_runtime::get_uniform_value_bool ( effect_uniform_variable  variable,
bool *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value of the specified uniform variable as boolean values.

Parameters
variableOpaque handle to the uniform variable.
valuesPointer to an array of booleans that is filled with the values of this uniform variable.
countNumber of values to read.
array_indexArray offset to start reading values from when this uniform variable is an array variable.

◆ get_uniform_value_float()

virtual void reshade::api::effect_runtime::get_uniform_value_float ( effect_uniform_variable  variable,
float *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value of the specified uniform variable as floating-point values.

Parameters
variableOpaque handle to the uniform variable.
valuesPointer to an array of floating-points that is filled with the values of this uniform variable.
countNumber of values to read.
array_indexArray offset to start reading values from when this uniform variable is an array variable.

◆ get_uniform_value_int()

virtual void reshade::api::effect_runtime::get_uniform_value_int ( effect_uniform_variable  variable,
int32_t *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value of the specified uniform variable as signed integer values.

Parameters
variableOpaque handle to the uniform variable.
valuesPointer to an array of signed integers that is filled with the values of this uniform variable.
countNumber of values to read.
array_indexArray offset to start reading values from when this uniform variable is an array variable.

◆ get_uniform_value_uint()

virtual void reshade::api::effect_runtime::get_uniform_value_uint ( effect_uniform_variable  variable,
uint32_t *  values,
size_t  count,
size_t  array_index = 0 
) const
pure virtual

Gets the value of the specified uniform variable as unsigned integer values.

Parameters
variableOpaque handle to the uniform variable.
valuesPointer to an array of unsigned integers that is filled with the values of this uniform variable.
countNumber of values to read.
array_indexArray offset to start reading values from when this uniform variable is an array variable.

◆ get_uniform_variable_effect_name() [1/2]

virtual void reshade::api::effect_runtime::get_uniform_variable_effect_name ( effect_uniform_variable  variable,
char *  effect_name,
size_t *  effect_name_size 
) const
pure virtual

Gets the effect file name of a uniform variable .

Parameters
variableOpaque handle to the uniform variable.
effect_namePointer to a string buffer that is filled with the effect file name of the uniform variable, or nullptr to query the necessary size.
effect_name_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.

◆ get_uniform_variable_effect_name() [2/2]

template<size_t SIZE>
void reshade::api::effect_runtime::get_uniform_variable_effect_name ( effect_uniform_variable  variable,
char(&)  effect_name[SIZE] 
) const
inline

◆ get_uniform_variable_name() [1/2]

virtual void reshade::api::effect_runtime::get_uniform_variable_name ( effect_uniform_variable  variable,
char *  name,
size_t *  name_size 
) const
pure virtual

Gets the name of a uniform variable .

Parameters
variableOpaque handle to the uniform variable.
namePointer to a string buffer that is filled with the name of the uniform variable, or nullptr to query the necessary size.
name_sizePointer to an integer that contains the size of the string buffer and is set to the actual length of the string, including the null-terminator.

◆ get_uniform_variable_name() [2/2]

template<size_t SIZE>
void reshade::api::effect_runtime::get_uniform_variable_name ( effect_uniform_variable  variable,
char(&)  name[SIZE] 
) const
inline

◆ get_uniform_variable_type()

virtual void reshade::api::effect_runtime::get_uniform_variable_type ( effect_uniform_variable  variable,
format out_base_type,
uint32_t *  out_rows = nullptr,
uint32_t *  out_columns = nullptr,
uint32_t *  out_array_length = nullptr 
) const
pure virtual

Gets information about the data type of a uniform variable .

Parameters
variableOpaque handle to the uniform variable.
out_base_typeOptional pointer to a variable that is set to the base type of the uniform variable (format::r32_typeless, format::r32_sint, format::r32_uint or format::r32_float).
out_rowsOptional pointer to a variable that is set to the number of vector rows of the uniform variable type.
out_columnsOptional pointer to a variable that is set to the number of matrix column of the uniform variable type.
out_array_lengthOptional pointer to a variable that is set to the number of array elements of the uniform variable type.

◆ is_key_down()

virtual bool reshade::api::effect_runtime::is_key_down ( uint32_t  keycode) const
pure virtual

Gets the current status of the specified key.

Parameters
keycodeThe virtual key code to check.
Returns
true if the key is currently pressed down, false otherwise.

◆ is_key_pressed()

virtual bool reshade::api::effect_runtime::is_key_pressed ( uint32_t  keycode) const
pure virtual

Gets whether the specified key was pressed this frame.

Parameters
keycodeThe virtual key code to check.
Returns
true if the key was pressed this frame, false otherwise.

◆ is_key_released()

virtual bool reshade::api::effect_runtime::is_key_released ( uint32_t  keycode) const
pure virtual

Gets whether the specified key was released this frame.

Parameters
keycodeThe virtual key code to check.
Returns
true if the key was released this frame, false otherwise.

◆ is_mouse_button_down()

virtual bool reshade::api::effect_runtime::is_mouse_button_down ( uint32_t  button) const
pure virtual

Gets the current status of the specified mouse button.

Parameters
buttonThe mouse button index to check (0 = left, 1 = middle, 2 = right).
Returns
true if the mouse button is currently pressed down, false otherwise.

◆ is_mouse_button_pressed()

virtual bool reshade::api::effect_runtime::is_mouse_button_pressed ( uint32_t  button) const
pure virtual

Gets whether the specified mouse button was pressed this frame.

Parameters
buttonThe mouse button index to check (0 = left, 1 = middle, 2 = right).
Returns
true if the mouse button was pressed this frame, false otherwise.

◆ is_mouse_button_released()

virtual bool reshade::api::effect_runtime::is_mouse_button_released ( uint32_t  button) const
pure virtual

Gets whether the specified mouse button was released this frame.

Parameters
buttonThe mouse button index to check (0 = left, 1 = middle, 2 = right).
Returns
true if the mouse button was released this frame, false otherwise.

◆ last_key_pressed()

virtual uint32_t reshade::api::effect_runtime::last_key_pressed ( ) const
pure virtual

Gets the virtual key code of the last key that was pressed.

◆ last_key_released()

virtual uint32_t reshade::api::effect_runtime::last_key_released ( ) const
pure virtual

Gets the virtual key code of the last key that was released.

◆ open_overlay()

virtual bool reshade::api::effect_runtime::open_overlay ( bool  open,
input_source  source 
)
pure virtual

Open or close the ReShade overlay.

Parameters
openRequested overlay state.
sourceSource of this request.
Returns
true if the overlay state was changed, false otherwise.

◆ reload_effect_next_frame()

virtual void reshade::api::effect_runtime::reload_effect_next_frame ( const char *  effect_name)
pure virtual

Queues up the specified effect for reloading in the next frame. This can be called multiple times with different effects to append to the queue.

Parameters
effect_nameFile name of the effect file that should be reloaded.

◆ render_effects()

virtual void reshade::api::effect_runtime::render_effects ( command_list cmd_list,
resource_view  rtv,
resource_view  rtv_srgb 
)
pure virtual

Applies post-processing effects to the specified render targets and prevents the usual rendering of effects before swap chain presentation of the current frame. This can be used to force ReShade to render effects at a certain point during the frame to e.g. avoid effects being applied to user interface elements of the application.

The resource the render target views point to has to be in the resource_usage::render_target state. This call may modify current state on the command list (pipeline, render targets, descriptor tables, ...), so it may be necessary for an add-on to backup and restore state around it if the application does not bind all state again afterwards already. Calling this with rtv set to zero will cause nothing to be rendered, but uniform variables to still be updated.

Parameters
cmd_listCommand list to add effect rendering commands to.
rtvRender target view to use for passes that write to the back buffer with SRGBWriteEnabled state set to false (this should be a render target view of the target resource, created with a non-sRGB format variant).
rtv_srgbRender target view to use for passes that write to the back buffer with SRGBWriteEnabled state set to true (this should be a render target view of the target resource, created with a sRGB format variant).

◆ render_technique()

virtual void reshade::api::effect_runtime::render_technique ( effect_technique  technique,
command_list cmd_list,
resource_view  rtv,
resource_view  rtv_srgb = { 0 } 
)
pure virtual

Applies a technique to the specified render targets (regardless of the state of this technique).

The width and height of the specified render target should match those used to render all other effects! The resource the render target views point to has to be in the resource_usage::render_target state. This call may modify current state on the command list (pipeline, render targets, descriptor tables, ...), so it may be necessary for an add-on to backup and restore state around it if the application does not bind all state again afterwards already.

Parameters
techniqueOpaque handle to the technique.
cmd_listCommand list to add effect rendering commands to.
rtvRender target view to use for passes that write to the back buffer with SRGBWriteEnabled state set to false.
rtv_srgbRender target view to use for passes that write to the back buffer with SRGBWriteEnabled state set to true, or zero in which case the view from rtv is used.

◆ reorder_techniques()

virtual void reshade::api::effect_runtime::reorder_techniques ( size_t  count,
const effect_technique techniques 
)
pure virtual

Changes the rendering order of loaded techniques to that of the specified technique list.

Parameters
countNumber of handles in the technique list.
techniquesArray of techniques in the order they should be rendered in.

◆ reset_uniform_value()

virtual void reshade::api::effect_runtime::reset_uniform_value ( effect_uniform_variable  variable)
pure virtual

Resets the value of the specified uniform variable .

Parameters
variableOpaque handle to the uniform variable.

◆ save_current_preset()

virtual void reshade::api::effect_runtime::save_current_preset ( ) const
pure virtual

Saves the current preset with the current state of the loaded techniques and uniform variables.

◆ set_color_space()

virtual void reshade::api::effect_runtime::set_color_space ( color_space  color_space)
pure virtual

Overrides the color space used for presentation.

◆ set_current_preset_path()

virtual void reshade::api::effect_runtime::set_current_preset_path ( const char *  path)
pure virtual

Saves the currently active preset and then switches to the specified new preset.

Parameters
pathFile path to the preset to switch to.

◆ set_effects_state()

virtual void reshade::api::effect_runtime::set_effects_state ( bool  enabled)
pure virtual

Enables or disables all effects.

Parameters
enabledSet to true to enable effects, or false to disable them.

◆ set_preprocessor_definition()

virtual void reshade::api::effect_runtime::set_preprocessor_definition ( const char *  name,
const char *  value 
)
pure virtual

Defines a preprocessor definition to the specified value .

Parameters
nameName of the definition.
valueValue of the definition.

◆ set_preprocessor_definition_for_effect()

virtual void reshade::api::effect_runtime::set_preprocessor_definition_for_effect ( const char *  effect_name,
const char *  name,
const char *  value 
)
pure virtual

Defines a preprocessor definition for the specified effect to the specified value .

Parameters
effect_nameFile name of the effect file the preprocessor definition should be defined for.
nameName of the definition.
valueValue of the definition.

◆ set_technique_state()

virtual void reshade::api::effect_runtime::set_technique_state ( effect_technique  technique,
bool  enabled 
)
pure virtual

Enables or disables the specified technique .

Parameters
techniqueOpaque handle to the technique.
enabledSet to true to enable the technique, or false to disable it.

◆ set_uniform_value_bool() [1/2]

void reshade::api::effect_runtime::set_uniform_value_bool ( effect_uniform_variable  variable,
bool  x,
bool  y = bool(0),
bool  z = bool(0),
bool  w = bool(0) 
)
inline

Sets the value of the specified uniform variable as a vector of boolean values.

Parameters
variableOpaque handle to the uniform variable.
xValue of the first component in the vector that is used to update this uniform variable.
yOptional value of the second component in the vector that is used to update this uniform variable.
zOptional value of the third component in the vector that is used to update this uniform variable.
wOptional value of the fourth component in the vector that is used to update this uniform variable.

◆ set_uniform_value_bool() [2/2]

virtual void reshade::api::effect_runtime::set_uniform_value_bool ( effect_uniform_variable  variable,
const bool *  values,
size_t  count,
size_t  array_index = 0 
)
pure virtual

Sets the value of the specified uniform variable as boolean values.

Parameters
variableOpaque handle to the uniform variable.
valuesPointer to an array of booleans that are used to update this uniform variable.
countNumber of values to write.
array_indexArray offset to start writing values to when this uniform variable is an array variable.

Setting the uniform value will not automatically save the current preset. To make sure the current preset with the changed value is saved to disk, explicitly call save_current_preset.

◆ set_uniform_value_float() [1/2]

virtual void reshade::api::effect_runtime::set_uniform_value_float ( effect_uniform_variable  variable,
const float *  values,
size_t  count,
size_t  array_index = 0 
)
pure virtual

Sets the value of the specified uniform variable as floating-point values.

Parameters
variableOpaque handle to the uniform variable.
valuesPointer to an array of floating-points that are used to update this uniform variable.
countNumber of values to write.
array_indexArray offset to start writing values to when this uniform variable is an array variable.

Setting the uniform value will not automatically save the current preset. To make sure the current preset with the changed value is saved to disk, explicitly call save_current_preset.

◆ set_uniform_value_float() [2/2]

void reshade::api::effect_runtime::set_uniform_value_float ( effect_uniform_variable  variable,
float  x,
float  y = float(0),
float  z = float(0),
float  w = float(0) 
)
inline

Sets the value of the specified uniform variable as a vector of floating-point values.

Parameters
variableOpaque handle to the uniform variable.
xValue of the first component in the vector that is used to update this uniform variable.
yOptional value of the second component in the vector that is used to update this uniform variable.
zOptional value of the third component in the vector that is used to update this uniform variable.
wOptional value of the fourth component in the vector that is used to update this uniform variable.

◆ set_uniform_value_int() [1/2]

virtual void reshade::api::effect_runtime::set_uniform_value_int ( effect_uniform_variable  variable,
const int32_t *  values,
size_t  count,
size_t  array_index = 0 
)
pure virtual

Sets the value of the specified uniform variable as signed integer values.

Parameters
variableOpaque handle to the uniform variable.
valuesPointer to an array of signed integers that are used to update this uniform variable.
countNumber of values to write.
array_indexArray offset to start writing values to when this uniform variable is an array variable.

Setting the uniform value will not automatically save the current preset. To make sure the current preset with the changed value is saved to disk, explicitly call save_current_preset.

◆ set_uniform_value_int() [2/2]

void reshade::api::effect_runtime::set_uniform_value_int ( effect_uniform_variable  variable,
int32_t  x,
int32_t  y = int32_t(0),
int32_t  z = int32_t(0),
int32_t  w = int32_t(0) 
)
inline

Sets the value of the specified uniform variable as a vector of signed integer values.

Parameters
variableOpaque handle to the uniform variable.
xValue of the first component in the vector that is used to update this uniform variable.
yOptional value of the second component in the vector that is used to update this uniform variable.
zOptional value of the third component in the vector that is used to update this uniform variable.
wOptional value of the fourth component in the vector that is used to update this uniform variable.

◆ set_uniform_value_uint() [1/2]

virtual void reshade::api::effect_runtime::set_uniform_value_uint ( effect_uniform_variable  variable,
const uint32_t *  values,
size_t  count,
size_t  array_index = 0 
)
pure virtual

Sets the value of the specified uniform variable as unsigned integer values.

Parameters
variableOpaque handle to the uniform variable.
valuesPointer to an array of unsigned integers that are used to update this uniform variable.
countNumber of values to write.
array_indexArray offset to start writing values to when this uniform variable is an array variable.

Setting the uniform value will not automatically save the current preset. To make sure the current preset with the changed value is saved to disk, explicitly call save_current_preset.

◆ set_uniform_value_uint() [2/2]

void reshade::api::effect_runtime::set_uniform_value_uint ( effect_uniform_variable  variable,
uint32_t  x,
uint32_t  y = uint32_t(0),
uint32_t  z = uint32_t(0),
uint32_t  w = uint32_t(0) 
)
inline

Sets the value of the specified uniform variable as a vector of unsigned integer values.

Parameters
variableOpaque handle to the uniform variable.
xValue of the first component in the vector that is used to update this uniform variable.
yOptional value of the second component in the vector that is used to update this uniform variable.
zOptional value of the third component in the vector that is used to update this uniform variable.
wOptional value of the fourth component in the vector that is used to update this uniform variable.

◆ update_texture()

virtual void reshade::api::effect_runtime::update_texture ( effect_texture_variable  variable,
const uint32_t  width,
const uint32_t  height,
const void *  pixels 
)
pure virtual

Uploads image data to the specified texture variable .

Parameters
variableOpaque handle to the texture variable.
widthWidth of the image data.
heightHeight of the image data.
pixelsPointer to an array of width * height * bpp bytes the image data is read from (where bpp is the number of bytes per pixel of the texture format).

◆ update_texture_bindings()

virtual void reshade::api::effect_runtime::update_texture_bindings ( const char *  semantic,
resource_view  srv,
resource_view  srv_srgb 
)
pure virtual

Binds new shader resource views to all texture variables that use the specified semantic .

The resource the shader resource views point to has to be in the resource_usage::shader_resource state at the time render_effects is executed.

Parameters
semanticReShade FX semantic to filter textures to update by (texture name : SEMANTIC).
srvShader resource view to use for samplers with SRGBTexture state set to false (this should be a shader resource view of the target resource, created with a non-sRGB format variant).
srv_srgbShader resource view to use for samplers with SRGBTexture state set to true (this should be a shader resource view of the target resource, created with a sRGB format variant).

The documentation for this struct was generated from the following file: