About this mod
SKSE plugin which adds a targeting depth-of-field effect when in combat and dialogue. Supports both vanilla and ENB depth-of-field.
- Requirements
- Permissions and credits
- Changelogs


OVERVIEW
Target Focus is an SKSE plugin which adds a targeting depth-of-field effect when in combat and dialogue.
This supports both vanilla and ENB depth-of-field.
The SKSE plugin is compatible with both 1.5.97 (pre-AE) and 1.6.xx (post-AE) thanks to commonlibsse-ng.


Previews are with the vanilla depth-of-field shader.
REQUIREMENTS
Address Library for SKSE Plugins
Optional, required only for target-lock.
True Directional Movement
Vanilla Depth of Field
The intensity is controlled by the Depth of field slider.

ENB Depth of Field
Extra data is supplied to the depth-of-field ENB shader via the ENB API/SDK. The shader itself must be patched to make use of the new data.
The optional ENB depth-of-field preset will smoothly transition between targets and states and is fully compatible once patched.
Patching McFly's Depth of Field for ENB
ADOF cannot be distributed with modifications
Unfortunately you need to patch ADOF yourself. This DoF was chosen as it is the one included in Rudy ENB.
Automated (recommended)
You can patch the shader using Web Patcher with the included patch file.
Download the ENB Shader Preset optional file.
Rom: enbdepthoffield.fx
Patch: enbdepthoffield.ips
Save as:enbdepthoffield.fx
Place enbdepthoffield.fx in the enbseries folder.
Use enbdepthoffield.ini (placed in the enseries folder) or configure your own.
Manual
Replace
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//external enb parameters, do not modify
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// external mod parameters, do not modify
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
bool bTargetFocusEnabled < string UIName = "Target Focus Enabled";> = { false };
floatfTargetFocusDistance < string UIName = "Target Focus Distance"; float UIStep = 0.0000001; > = { 1.0000000 };
floatfTargetFocusPercent < string UIName = "Target Focus Percent";float UIStep = 0.0000001; > = { 1.0000000 };
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//external enb parameters, do not modify
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Replace
depthdata.xy = saturate(depthdata.xy / fADOF_HyperFocus);
depthdata.xy = lerp(saturate(depthdata.xy / fADOF_HyperFocus), depthdata.xy, fTargetFocusPercent); //hyperfocal distance
Replace
return scenefocus;
return lerp(scenefocus, fTargetFocusDistance * 1.5, bTargetFocusEnabled);
COMPATIBILITY
Compatible with everything including SmoothCam
SOURCE
doodlum/skyrim-target-focus
CREDITS
Ershin for his awesome mods and a useful camera position function.