DoF:-------------GPmod & DSLR in one file.
SeperableHex:--performance friendly, only do hexagon, support both GPmod & DSLR.
BokehShape:---support custom aperture pattern.
history versions:
GPmod:-----------based on gp65cj04's dof with extra GUI.
DSLR:------------featuring real lens focusing.
*update 3/13 2015 :
----update DoF, SeperableHex. Fix a bug in ENABLE_GP. (Thanks to the bug report by Confidence Man)
*update 3/11 2015 :
----replace GPmod & DSLR with DoF, a combination of both file along with tons of changes. update Separable Hex, now support both GPmod & DSLR focusing.
*update 3/6 2015 :
----add online dof calculator, check out DoF Calculator section.
*update 12/22 :
----upload performance dof, see Separable Hex section.
*update 12/13 :
----update dof files. replace "=" in string UIName, which will cause .fx.ini overflow.
*update 11/6 :
----upload additional dof file for thin lens model, see DLSR section.
*update 10/29 :
----fix leaking caused by highlighting, fix red tint around focused object, fix increased brightness, fix transverse CA, remove GUI AF sample Range
*update 10/26 :
----update enbeffectprepass.fx , add quality setting, add optical vignette, fix tilt shift func, add tilt shift axis, remove polygon triangle & square, add axial & trans chromatic aberration, add AF cursor, replace brightpass with natural highlight
DoF:
*need a better name for this...
update: 3/13 2015
A combination of my previous GPmod & DSLR version with numerous updates .
Featuring:
- ingame quality option
- per-tap chromatic aberration(slow), both axial and transverse
- post chromatic aberration(fast), both axial and transverse
- optical vignette for swirling bokeh
- natural highlight
- ingame bokeh shape
- bokeh deformation (polygon to circle)
- bokeh angle offset
- bokeh XY ratio for anamorphic lens
- bokeh bias for "donut" effect
- adaptive quality, use fewer taps when CoC is relatively small
- fixed Tilt-Shift with rotational axis
- both GPmod & DSLR in single file
- Auto DoF for DSLR ver
- AF cursor
- MF_mode to switch between auto and manual focus
Code: Select all
#define ENABLE_NOISE //film grain
#define ENABLE_GAUSSIAN //post gaussian blur, not recommend to disable
#define ENABLE_TILT_SHIFT //tilt shift
#define ENABLE_AUTO_DOF //auto dof
#define ENABLE_CHROMA //chromatic aberration(slow), quality
#define ENABLE_POST_CHROMA //chromatic aberration(fast), performance
#define ENABLE_ADAPTIVE_QUALITY //assign different quality according to CoC size, increase performance
#define ENABLE_GP //use gp65cj04's coc calculation
#define ENABLE_VIGNETTE //optical vignette where bokeh at screen edge are partially obscured
TESV.exe_DX9_20150305_222117 by kingeric1992311, on Flickr
Swirling bokeh
GUI Settings:
Code: Select all
++++++ LENS SETTINGS ++++++
MF mode //switch between auto/manual focus
Display AF Cursor //display focus point for AF
AF pos //(0, 0) at top left corner.
//GPmod controls
AF Near Blur Curve //scale CoC size in foreground
AF Far Blur Curve //used to compute Far Blur Plane in AF
MF Far Blur Plane(m)//depth to apply maximum CoC
MF Focused Plane(m) //Manual focused depth
Aperture Size(%) //CoC Multiplier.
Aperture Deform //Aperture Shape deformation( 0 == circle, 1 == polygon).
//GPmod ends
//DSLR controls
MF Focused Plane(m) //Manual focused depth
Focal Length(mm) //Focal length
F_Number //f-number(f-stop)
//DSLR ends
Aperture Shape //Aperture shape, polygons
Aperture Ratio //Aperture xy ratio
Aperture Angle(°) //Base aperture angle.
Bokeh deformation
Code: Select all
++++++++ AUTO-DOF +++++++++ //Automatically calculate F-number
AD mode //0 == off( use f-number), 1 == use sample points, 2 == use Near DoF Plane
CoC Size(px) //CoC Size at sample point( AD mode == 1) or at certain depth (AD mode == 2)
Near DoF Plane(m) //specified depth to assign AD_Level (AD mode == 2)
Sample Range //AD_Offset scaling.( AD_Offset is sample points for AD mode == 1)
+++++++ TILT-SHIFT ++++++++ //give an optical illusion of a photograph of a miniature scale model
Tilt Shift Axis(°) //Rotate tilt axis
Tilt Shift Angle(°) //0 == no tilt shift
+++++ BOKEH SETTINGS ++++++
Quality //quality, [0, 7]
Bokeh Highlight // > 1 to increace highlight, < 1 to decreace. (not recommend over 5)
Bokeh Bias //Brightness of center point
Bokeh Bias Curve //brightness curve from center to edge
Guassian Radius //Guassian Size.
Bokeh ratio(old GUI)
Code: Select all
++++ OPTICAL VIGNETTE +++++"; //bokeh vignette, create "swirling bokeh" effect
Vignette Bias //0 == no vignette.
Vignette Radius //vignette radius, minimum == max CoC.
Vignette Curve //vignette curve from screen center to screen edge
++++++++++ NOISE ++++++++++"; //Draw noise to blured areas
Noise Amount //noise amount
Noise Curve //pow( CoC, Curve)
++++++++++ CHROMA +++++++++ //Axial(longitudinal) & Transverse(lateral) CA
Chroma Curve (Trans) //distortion curve
Chroma Amount (Trans) //distortion at screen edge
Chroma Curve (Axial) //distortion curve
Chroma Amount (Axial) //distortion at bokeh edge
Chroma Red Multiplier //radius scale for RB color channel
CA, AF cursor, Vignette
Notes:
for DSLR mode:
To get the scale right, you need to set zF, zN manually inside prepass.fx
zF = [SkyrimPerfs.ini]- fBlockMaximumDistance / 100
zN = [Skyrim.ini]------- fNearDistance / 100
You can also set FOV according to focal length. Just open console (~), type "FOV <angle of view>"
check wiki page for angle of view table Please leave comments and make the dof even more awesome.
TESV.exe_DX9_20141024_125027 by kingeric1992311, on Flickr
Separable Hex:
update: 3/13 2015
It can only do hexagonal bokeh, controls are identical to DoF.
Should only cost minimum frame rate, but do expect artifacts on certain condition.
Custom Shaped Bokeh:
update: 7/10 2014
To enable this, copy enbbokehmask.bmp to skyrim folder and use GUI to set Bokeh Shape = 5
Default DoF quality is 6
GUI options:
Mask Pos X: adjust mask position in X direction
Mask Pos Y: adjust mask position in Y direction
Mask Size: scale mask size
You can also create your own shape by making a enbbokehmask.bmp, the input shape should rotate 180 degree.
the resolution in game is (dof quality x 2) X (dof quality x 2), so for DoF quality = 6, the resolution is 12 x 12.
.rar contains enbeffectprepass.fx and 4 different mask as shown in above screenshots. Rename them to enbbokehmask.bmp to switch between shapes. *Thanks to Insomnia for for loading additional texture code.
todo: eliminate artifact at upper left corner
History Versions:
GPmod: update: 12/13 2014 DSLR: update: 12/13 2014 DoF Calculator:
*colored area are depth of field range. (where object in the range will considered clear)
Try those sliders on the left panel to test it out.
GPmod
Link: https://www.desmos.com/calculator/zjrawyrh18
DSLR
Link: https://www.desmos.com/calculator/tlkj3c4la6
Anamorphic Lens Flares:
http://www.mediafire.com/view/8ubce9ebj ... enblens.fx
*Thanks to Kermles for performance tips.
Post Update Log:
*update 3/13 2015 :
re-upload DoF & SeparableHex. Fix a bug in ENABLE_GP. (bug report by Confidence Man)
*update 3/11 2015 :
add "DoF", update SeperableHex, description changes.
*update 3/6 2015 :
add dof calculator link.
*update 12/22 :
upload performance dof.
*update 12/13 :
update dof files. replace "=" in string UIName, which will cause .fx.ini overflow.
*update 11/6 :
upload additional dof file for thin lens model
*update 10/29 :
fix leaking caused by highlighting, fix red tint around focused object, fix increased brightness, fix transverse CA, remove GUI AF sample Range
*update 10/26 :
update enbprepass.fx , add quality setting, add optical vignette, fix tilt shift func, add tilt shift axis, remove polygon triangle & square, add axial & trans chromatic aberration, add AF cursor, replace brightpass with natural highlight
*update 7/10 :
add custom bokeh shape.
*update 6/25 :
add enblens.fx with ALF