This file enables you to mask the UI pane at the bottom of the screen so that selected ReShade filters (such as DOF) won't be applied there. It is 100% mod-compatible.
To install, simply unpack this archive to your Medieval II Folder. In the game, activate the ReShade shaders "UIMask_Top" and "UIMask_Bottom" (I believe they're included by default, otherwise make sure to activate "Legacy Effects" when installing ReShade) and place the shaders you'd like to mask in between the two. If you need more detailed instructions, check out this video that also explains how to create this file by yourself.