A dynamic library that hooks into the KCD2's cry engine to monitor shader resources, apply fixes for mac in runtime, and provide runtime debugging capabilities.
This DLL injects into the game process to hooks engine functions, log shader information, and apply memory patches. It includes hotkey-controlled logging to minimize performance overhead during normal gameplay.
Entry point of the DLL. Handles initialization and sets up the hooking system when the library is loaded into the game process.
Monitors and logs the shader resource count by printing CShader::s_ShaderResources_known.Num() to the log file. Useful for tracking shader loading and resource usage.
Applies binary patches to the game engine in memory at runtime. Allows modification of engine behavior without altering game files on disk.
Contains utility functions that print the call stack to the log file. Essential for debugging and understanding code execution flow when hooks are triggered.
Contains the core hooking functions that intercept game engine shader loading functions. Monitors shader operations and provides detailed logging capabilities.
Implements keyboard input monitoring to dynamically control logging behavior. Allows enabling/disabling extensive logging on-demand via hotkeys.
Purpose: Prevents performance overhead from excessive logging by keeping detailed logs disabled during normal gameplay and enabling them only when needed for debugging.
- Place
hook.dllin the game's binary directory (see Extra folder instructions) - Enable Wine override for DLL injection
- Launch the game
- Use configured hotkeys to toggle verbose logging when debugging is needed
- Check log files for shader information and stack traces: