MCPcopy Create free account
hub / github.com/crosire/reshade / update_effect_runtime

Function update_effect_runtime

examples/09-depth/generic_depth_addon.cpp:474–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474static void update_effect_runtime(effect_runtime *runtime)
475{
476 const auto &data = *runtime->get_private_data<generic_depth_data>();
477
478 runtime->update_texture_bindings("DEPTH", data.selected_shader_resource, data.selected_shader_resource);
479
480 runtime->enumerate_uniform_variables(nullptr, [&data](effect_runtime *runtime, effect_uniform_variable variable) {
481 char source[32];
482 if (runtime->get_annotation_string_from_uniform_variable(variable, "source", source) &&
483 std::strcmp(source, "bufready_depth") == 0)
484 runtime->set_uniform_value_bool(variable, data.selected_shader_resource != 0);
485 });
486}
487
488static void on_init_device(device *device)
489{

Callers 2

on_begin_render_effectsFunction · 0.85
draw_settings_overlayFunction · 0.85

Tested by

no test coverage detected