Skip to content

Commit

Permalink
dev(mods::shaders): increase logging
Browse files Browse the repository at this point in the history
  • Loading branch information
clshortfuse committed Dec 1, 2024
1 parent a8b3a8c commit a4c20d1
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/mods/shader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,12 +637,29 @@ static bool HandlePreDraw(reshade::api::command_list* cmd_list, bool is_dispatch

if (custom_shader_info.on_draw != nullptr) {
bool should_draw = custom_shader_info.on_draw(cmd_list);
if (!should_draw) return true; // bypass draw
if (!should_draw) {
#ifdef DEBUG_LEVEL_1
std::stringstream s;
s << "mods::shader::HandlePreDraw(bypass draw: ";
s << PRINT_CRC32(shader_hash);
s << ")";
reshade::log::message(reshade::log::level::debug, s.str().c_str());
#endif
return true; // bypass draw
}
}

if (custom_shader_info.on_replace != nullptr) {
bool should_replace = custom_shader_info.on_replace(cmd_list);
if (!should_replace) {
#ifdef DEBUG_LEVEL_1
std::stringstream s;
s << "mods::shader::HandlePreDraw(Not replacing: ";
s << PRINT_CRC32(shader_hash);
s << ", stage:" << stage;
s << ")";
reshade::log::message(reshade::log::level::debug, s.str().c_str());
#endif
shader_state.pending_replacements.erase(stage);
continue;
}
Expand Down

0 comments on commit a4c20d1

Please sign in to comment.