165 template <
typename F>
199 template <
size_t SIZE>
202 size_t name_size = SIZE;
255 template <
size_t SIZE>
258 size_t value_size = SIZE;
317 const bool values[4] = { x, y, z, w };
342 const float values[4] = { x, y, z, w };
367 const int32_t values[4] = { x, y, z, w };
392 const uint32_t values[4] = { x, y, z, w };
408 template <
typename F>
429 template <
size_t SIZE>
432 size_t name_size = SIZE;
485 template <
size_t SIZE>
488 size_t value_size = SIZE;
532 template <
typename F>
553 template <
size_t SIZE>
556 size_t name_size = SIZE;
609 template <
size_t SIZE>
612 size_t value_size = SIZE;
637 template <
size_t SIZE>
640 size_t value_size = SIZE;
680 template <
size_t SIZE>
683 size_t path_size = SIZE;
721 template <
size_t SIZE>
724 size_t effect_name_size = SIZE;
735 template <
size_t SIZE>
738 size_t effect_name_size = SIZE;
749 template <
size_t SIZE>
752 size_t effect_name_size = SIZE;
770 template <
size_t SIZE>
773 size_t value_size = SIZE;
input_source
Input source for events triggered by user input.
Definition: reshade_api.hpp:38
color_space
The available color space types for presentation.
Definition: reshade_api_format.hpp:157
format
Available data and texture formats. This is mostly compatible with 'DXGI_FORMAT'.
Definition: reshade_api_format.hpp:18
Definition: reshade.hpp:56
#define RESHADE_DEFINE_HANDLE(name)
Definition: reshade_api_resource.hpp:8
A command list, used to enqueue render commands on the CPU, before later executing them in a command ...
Definition: reshade_api_device.hpp:663
A command queue, used to execute command lists on the GPU.
Definition: reshade_api_device.hpp:1131
The base class for objects that are children to a logical render device.
Definition: reshade_api_device.hpp:634
A post-processing effect runtime, used to control effects.
Definition: reshade_api.hpp:51
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 .
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.
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 h...
Definition: reshade_api.hpp:166
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 .
virtual void get_technique_name(effect_technique technique, char *name, size_t *name_size) const =0
Gets the name of a technique .
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 .
bool get_annotation_string_from_technique(effect_technique technique, const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:610
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.
virtual bool get_preprocessor_definition(const char *name, char *value, size_t *value_size) const =0
Gets the value of a preprocessor definition.
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.
Definition: reshade_api.hpp:365
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.
virtual bool is_key_down(uint32_t keycode) const =0
Gets the current status of the specified key.
void get_technique_name(effect_technique technique, char(&name)[SIZE]) const
Definition: reshade_api.hpp:554
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.
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 h...
Definition: reshade_api.hpp:409
resource get_current_back_buffer()
Gets the current back buffer resource.
Definition: reshade_api.hpp:71
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.
virtual bool is_mouse_button_released(uint32_t button) const =0
Gets whether the specified mouse button was released this frame.
virtual bool is_mouse_button_pressed(uint32_t button) const =0
Gets whether the specified mouse button was pressed this frame.
virtual void get_current_preset_path(char *path, size_t *path_size) const =0
Gets the file path to the currently active preset.
virtual bool get_effects_state() const =0
Gets whether rendering of effects is enabled or disabled.
bool get_preprocessor_definition(const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:638
bool get_annotation_string_from_texture_variable(effect_texture_variable variable, const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:486
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.
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 r...
virtual bool open_overlay(bool open, input_source source)=0
Open or close the ReShade overlay.
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 ...
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.
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.
Definition: reshade_api.hpp:315
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 .
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 value...
bool get_preprocessor_definition_for_effect(const char *effect_name, const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:771
virtual void set_technique_state(effect_technique technique, bool enabled)=0
Enables or disables the specified technique .
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.
virtual uint32_t last_key_released() const =0
Gets the virtual key code of the last key that was released.
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.
void get_current_preset_path(char(&path)[SIZE]) const
Definition: reshade_api.hpp:681
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.
void get_technique_effect_name(effect_technique technique, char(&effect_name)[SIZE]) const
Definition: reshade_api.hpp:750
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.
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.
Definition: reshade_api.hpp:340
virtual void set_color_space(color_space color_space)=0
Overrides the color space used for presentation.
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.
Definition: reshade_api.hpp:390
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 wit...
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 ...
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 ...
virtual void save_current_preset() const =0
Saves the current preset with the current state of the loaded techniques and uniform variables.
virtual bool get_technique_state(effect_technique technique) const =0
Gets the state of a technique .
virtual void set_preprocessor_definition(const char *name, const char *value)=0
Defines a preprocessor definition to the specified value .
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 .
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.
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 e...
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 .
void get_uniform_variable_effect_name(effect_uniform_variable variable, char(&effect_name)[SIZE]) const
Definition: reshade_api.hpp:722
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 val...
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.
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.
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.
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).
void enumerate_techniques(const char *effect_name, F lambda)
Enumerates all techniques of loaded effects and calls the specified callback function with a handle f...
Definition: reshade_api.hpp:533
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 .
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.
virtual void * get_hwnd() const =0
Gets the handle of the window associated with this effect runtime.
virtual uint32_t last_key_pressed() const =0
Gets the virtual key code of the last key that was pressed.
virtual bool is_mouse_button_down(uint32_t button) const =0
Gets the current status of the specified mouse button.
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.
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 .
bool get_annotation_string_from_uniform_variable(effect_uniform_variable variable, const char *name, char(&value)[SIZE]) const
Definition: reshade_api.hpp:256
virtual bool is_key_pressed(uint32_t keycode) const =0
Gets whether the specified key was pressed this frame.
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 ...
virtual command_queue * get_command_queue()=0
Gets the main graphics command queue associated with this effect runtime. This may potentially be dif...
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 value...
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 val...
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 .
virtual uint32_t get_current_back_buffer_index() const =0
Gets the index of the back buffer resource that can currently be rendered into.
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 value...
virtual void set_current_preset_path(const char *path)=0
Saves the currently active preset and then switches to the specified new preset.
virtual bool is_key_released(uint32_t keycode) const =0
Gets whether the specified key was released this frame.
void get_texture_variable_effect_name(effect_texture_variable variable, char(&effect_name)[SIZE]) const
Definition: reshade_api.hpp:736
void get_texture_variable_name(effect_texture_variable variable, char(&name)[SIZE]) const
Definition: reshade_api.hpp:430
void get_uniform_variable_name(effect_uniform_variable variable, char(&name)[SIZE]) const
Definition: reshade_api.hpp:200
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.
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 .
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 .
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.
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 .
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.
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 .
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 value...
virtual void set_effects_state(bool enabled)=0
Enables or disables all effects.
virtual bool capture_screenshot(void *pixels)=0
Captures a screenshot of the current back buffer resource and returns its image data.
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.
virtual void reset_uniform_value(effect_uniform_variable variable)=0
Resets the value of the specified uniform variable .
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.
An opaque handle to a technique in an effect.
Definition: reshade_api.hpp:18
An opaque handle to a texture variable in an effect.
Definition: reshade_api.hpp:25
An opaque handle to a resource view object (depth-stencil, render target, shader resource view,...
Definition: reshade_api_resource.hpp:432
An opaque handle to a resource object (buffer, texture, ...).
Definition: reshade_api_resource.hpp:336